On Shame

November 16, 2007 |

From an IM conversation:

Friend: I want the syntax to find all files in /home older than 30 days so I can nuke them
Pablo: find /home -mtime +30 -type f
Friend: so find /home -mtime +30 -type f | rm -rf
Friend: thats all I need?
Pablo: find /home -mtime +30 -type f -print0 | xargs --null -- rm -f --
Friend: ok
Friend: I’m doing it with PHP right now….
Pablo: the print0/null parts are in case you have filenames with spaces
Friend: which is… fun… :(
Pablo: i hate you
Pablo: why do you need to make me feel so dirty


No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

Or use your OpenID: