User Profile

Collapse

Profile Sidebar

Collapse
xavix
xavix
Last Activity: Feb 24 '09, 06:45 PM
Joined: Feb 18 '09
Location: Barcelona, Spain
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • xavix
    replied to Move files by date
    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!
    See more | Go to post

    Leave a comment:


  • xavix
    started a topic Move files by date

    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
    | ...
    See more | Go to post
No activity results to display
Show More
Working...