a guest Jan 12th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ls -lt | grep 2011-10-07 | grep -v drwx | cut -d: -f2 | cut -d' ' -f2 | xargs rm
- from current directory remove files modified on 2011-10-07 leaving out directories
- ls -lt -l - long list of files in current directory with atributes one file per line
- -t sorted by time
- grep 2011-10-07 - select only lines with todays date
- grep -v drvx - -v exclude lines with drvx string of atributes indicating directory
- cut -d: -f2 - select second field in the file list separated by ':' separator as in
- -rw-r--r-- 1 daniel daniel 7115 2011-10-07 10:24 gsl_numobj.pyc
- cut -d' ' -f2 - select name of the file which is the second field in line separated by ' '
- xargs rm - remove files from the list transfered to rm as the result of previous stages
- treating each word in the list as a separate argument
RAW Paste Data