Move, copy or delete files of particular date.
Quick and the good one.
Eg. To delete files with a particular date without using find command ( hardcore process)
ls -ltr | grep "May 23" | awk '{print "mv "$9" /disk1/oradata/arch/"}' | more
above will list all the files that are having May 23 date.
ls -ltr | grep "May 23" | awk '{print "mv "$9" /disk1/oradata/arch/"}' | sh –x
This will execute the output. Customize the output and sh –x will execute the output.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment