Published in: Bash
URL: http://www.linuxquestions.org/questions/showthread.php?t=7368
find /var/log -mtime -14 -type f -exec ls -al {} \;
Comments
Subscribe to comments
You need to login to post a comment.
bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.
jhenry on 06/12/07
time date command Shell script unix linux files line find
2 people have marked this snippet as a favorite
Published in: Bash
URL: http://www.linuxquestions.org/questions/showthread.php?t=7368
find /var/log -mtime -14 -type f -exec ls -al {} \;
Subscribe to comments
You need to login to post a comment.
or, to remove all jpg's in the current directory older that two weeks:
$ find . -mtime +14 -type f -name "*.jpg" -exec rm -f {} \;
careful!