find
command is used for searching file in directory structure, below are some basic examples for getting started…Basic syntax: find directory comparison search-term
find ./dir_name -name "*.txt"
.
represents current directoryfind ./dir_name -iname "*.txt"
find ./test -not -name "*.txt"
find ./dir_name -mtime N
find /home/bob -mtime -10
find /home/bob -cmin -10
find / -size 50M
find / -size +50M -size -100M
find / -size +50M ! -name "*.deb" -ls
find ./dir_name -name "*.txt" -exec rm -rf {} \;
{}
: represent for each output for criteria\;
: Termination of commandReference: http://www.binarytides.com/linux-find-command-examples/