Find
Examples of find command
sudo find / -type d -iname "gasper"
- search direcotrysudo find /etc -type f -name "*.conf"
- display all configuration files, for more percison you should|
intogrep
.sudo find / -iname "*~" -exec rm -i {} \;
- remove all files with~
in namesudo find / -type f -size +100M
- find files larger than 100MBsudo find / -type f -size +100M -exec ls -lh {} \;
- find files larger than 100MB and list themsudo find / -type f -size +100M -exec ls -lh {} \; | awk '{print $9 ": " $5}'
- find files larger than 100MB and list them with sizesudo find / -type f -size +100M -exec ls -lh {} \; | awk '{print $9 ": " $5}' | fzf
- find files larger than 100MB and list them with size and select one with fzf
You can also add size
flag to narrow down results to expected filesize. Other useful flags: user
, group
.