cheat/cheatsheets/find
Özgür Özdemircili 9e1ea4fae4 New cheats on find
2013-08-30 12:16:39 +02:00

19 lines
429 B
Plaintext

# To find files by extension (ex: .jpg):
find . -iname "*.jpg"
# To find directories:
find . -type d
# To find files:
find . -type f
# To find files by octal permission:
find . -type f -perm 777
# To find files with setuid bit set:
find . -xdev \( -perm -4000 \) -type f -print0 | xargs -0 ls -l
# To find files bigger thank 2 MB and list them:
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'