Hi all,
let me explain my requirments
i am having 5 folder with different name for eg) abc , cdf , efd, rtg, ead
each 5 folders contain 15 files
i want to move 10 files to some other folder, remain 5 files should be there in the same folder.
give me some suggestion on this.
zaxxon
2
Any criteria on which 10 files to pick and which 5 to leave?
last 5 days file should be there and remaining need to move
panyam
4
find . -type f -ctime +5 mv {} destination_path \;
thnks panyam
but my criteria is
i am having 5 folder with different name
e.g)
folder 1 --> 123/abc/(15 day files)
folder 1 --> 123/cdb/(15 day files)
folder 1 --> 123/qwe/(15 day files)
folder 1 --> 123/dfg/(15 day files)
folder 1 --> 123/qsd/(15 day files)
where 123 is the parent folder for abc,cbd,qwe,dfg,qsd
all the five folders having 15 days file , in that except last 5 days
i need to zip the remaining days files and move to different folder ......
---------- Post updated at 05:28 AM ---------- Previous update was at 05:16 AM ----------
auctually i tried , but i could find for 5 directories ......
any suggestion plz
panyam
6
cd 123
find . -type f -mtime +5 -exec mv {} /tmp/dest \;
find /tmp/dest -type f -mtime +5 -exec gzip {} \;
thanks a lot panyam
thnks for ur quick replay