User Tools

Site Tools


bash_oneliners

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
bash_oneliners [2020/06/10 17:26]
admin
bash_oneliners [2020/06/10 17:27] (current)
admin
Line 16: Line 16:
   * To find the largest file in all sub-directories:   * To find the largest file in all sub-directories:
 <code> <code>
-find /path/to/folder -type f -exec ls -s {} \; | sort -nr | awk 'NR==1 { $1=""; sub(/^ /, ""); print }'+find -type f -exec ls -s {} \; | sort -nr | awk 'NR==1 { $1=""; sub(/^ /, ""); print }'
 </code> </code>
   * grep for valid IP Addresses.   * grep for valid IP Addresses.
bash_oneliners.txt ยท Last modified: 2020/06/10 17:27 by admin