daily pastebin goal
12%
SHARE
TWEET

Untitled

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