shell Linux common usage scenarios

1. Filter the current folder list file according to the file size

All files # clear the current folder, the file size is less than 50kb greater than - gt
 for File in `LS /`;. Do size = `du $ File | awk ' {Print \ $. 1} ' `; [$ size -LT- 50 ] && rm $ file; done

 

Guess you like

Origin www.cnblogs.com/nyatom/p/11467097.html