(Elementary user)
My goal is to find and move directories with a certain date, and move them 'intact' to a new location.
My script below is working but it's putting the contents of the directories it finds 'loosely' in the target folder.
e.g. the script finds the directories 'ABC' and 'XYZ' but it places the CONTENTS thereof in/raid/legacy_data/
find . -type d -mtime 1 -name '*' -exec mv {} /raid/legacy_data/ \;
Is there a way of achieving:
/raid/legacy_data/ABC/content
/raid/legacy_data/XYZ/content
...
My goal is to find and move directories with a certain date, and move them 'intact' to a new location.
My script below is working but it's putting the contents of the directories it finds 'loosely' in the target folder.
e.g. the script finds the directories 'ABC' and 'XYZ' but it places the CONTENTS thereof in/raid/legacy_data/
find . -type d -mtime 1 -name '*' -exec mv {} /raid/legacy_data/ \;
Is there a way of achieving:
/raid/legacy_data/ABC/content
/raid/legacy_data/XYZ/content
...