How to find a file with Linux using the command line.

The Linux command line offers useful tools that enable you to find files easily. The find command is one useful example. Here I am using the find command to look for all *.png files in a folder. homer@deusexmachina ~/Documents $ find /usr/share/backgrounds -name "*.png" /usr/share/backgrounds/linuxmint-petra/linux_mint_16.png /usr/share/backgrounds/linuxmint-petra/petra.png /usr/share/backgrounds/warty-final-ubuntu.pnghomer@deusexmachina ~/Documents $ find /usr/share/backgrounds -name "*.png" /usr/share/backgrounds/linuxmint-petra/linux_mint_16.png /usr/share/backgrounds/linuxmint-petra/petra.png … Read more

Very cool and interesting Linux commands.

How to search your home directory for certain files. The find command is very useful for searching your computer for various files. john@adeptus-mechanicus ~ $ find /home/$LOGNAME -name "*.avi" /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/The.Hobbit.2012.DVDSCR.XVID-NYDIC.avi /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/sample/sample.avijohn@adeptus-mechanicus ~ $ find /home/$LOGNAME -name "*.avi" /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/The.Hobbit.2012.DVDSCR.XVID-NYDIC.avi /home/john/Azureus Downloads/[ … Read more

Useful tricks when using the find command on Linux and backticks.

Using the Linux command-line allows a lot of flexibility when running commands and how they are run. Take the example below for instance. rm `find ./ -name "*~"`rm `find ./ -name "*~"` This command runs a command within backticks and outputs the result as an argument to the rm command. This command will therefore delete … Read more