Wednesday, July 27, 2016

Delete multiple files through awk command in linux

Delete multiple files through awk command in linux

ls -lrth|egrep -v "Jul 27"|awk {'print $9'}|xargs rm -rfv

ls -lrth -----list file

egrep ---for exclude 

awk {'print $9'} ---print value

xargs rm -rfv --- remove file 

No comments:

Post a Comment