Hi Jeff,
$SOURCE is something like /mnt/data/
I played around -depth and the option that only copy the wanted files is "-mindepth 2". What happens now is that "find $SOURCE -mindepth 2 -mtime -15 -exec mv {} $DEST \;" copies the files but not the folders that contains such files.
Probably you are right and should write more code than a simply find command
Thanks!
User Profile
Collapse
-
Move files by date
Hello,
How can I move files based on age in the following scenario:
$SOURCE contains some subfolders with some files inside them.
Each subfolder contain files of the same date, but the last modofication date of the subfolder can be more recent than the date of the files inside it, e.g.:
$tree . -D
.
|-- [Feb 18 16:44] Folder1
| |-- [Feb 3 3:58] 1.jpg
| ...
No activity results to display
Show More
Leave a comment: