mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 13:42:11 +01:00
sizes and typo corrected
`-size +20000k` actually matches files bigger than 20,000*1,024=20,480,000 Bytes, not 20,000,000 Bytes as in “2 Megabytes”.
This commit is contained in:
parent
cdf573a725
commit
837e0b5b71
1 changed files with 3 additions and 3 deletions
|
@ -19,11 +19,11 @@ find ./path/ -name '*.txt' -exec rm '{}' \;
|
||||||
# To find files with extension '.txt' and look for a string into them:
|
# To find files with extension '.txt' and look for a string into them:
|
||||||
find ./path/ -name '*.txt' | xargs grep 'string'
|
find ./path/ -name '*.txt' | xargs grep 'string'
|
||||||
|
|
||||||
# To find files with size bigger than 5 Mb and sort them by size:
|
# To find files with size bigger than 5 Mebibyte and sort them by size:
|
||||||
find . -size +5M -type f -print0 | xargs -0 ls -Ssh | sort -z
|
find . -size +5M -type f -print0 | xargs -0 ls -Ssh | sort -z
|
||||||
|
|
||||||
# To find files bigger thank 2 MB and list them:
|
# To find files bigger than 2 Megabyte and list them:
|
||||||
find . -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
|
find . -type f -size +200000000c -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
|
||||||
|
|
||||||
# To find files modified more than 7 days ago and list file information
|
# To find files modified more than 7 days ago and list file information
|
||||||
find . -type f -mtime +7d -ls
|
find . -type f -mtime +7d -ls
|
||||||
|
|
Loading…
Reference in a new issue