How To Copy all Files and Folders from specific date?
Hi
I wanna copy all folders and files created from 01.01.2011 until today to new place ie: cp -r /home/moviecar/public_html/wp-content/uploads/ /home/teaser/public_html/wp-content/uploads |
I found a method that should work using xarg and find commands(but I cant get it working. You may have better luck).
Here is the url: http://www.cyberciti.biz/faq/linux-u...lists-utility/ Here is the command I'm tying: Code:
find /home/petreuss/examp1/ -mtime -30 | xargs -0 -r -I * cp -v -p * --target-directory=/home/petreuss/examp2 Code:
-mtime -30 If anyone sees the mistake in my code please let me know. Its really starting to irritate me. Good luck |
Ok.
I got the command working. I hope this helps your situation. I'm using this command the find to move/copy files: Code:
find /home/petreuss/test/ -iname "*" -mtime -30 -print0 | xargs -0 -I {} cp -v {} /home/petreuss/test2/ iname can filter files for example Code:
-iname ".txt" Code:
-mtime Quote:
Code:
-print0 Good luck |
Quote:
The "-0" option to xargs tells it to use NULLs as separators. |
Quote:
Code:
touch -t 201101010000 reference.file Code:
$ stat -c "%y %n" reference.file Code:
find /path/to/folder -type f -newer reference.file -exec cp '{}' /path/to/target/folder \; Code:
find /path/to/folder -type f -newerBB reference.file -exec cp '{}' /path/to/target/folder \; [IMPORTANT] I have used this technique on Linux filesystems but I have never tried using 'find' this way on a windows partition. I am simply deducing the procedure. Hope this helps. |
All times are GMT -5. The time now is 11:31 PM. |