Archive for the 'Linux Commands' Category

Find (and delete) Duplicate Files On Linux

Friday, February 29th, 2008

fdupes is a program for identifying/deleting duplicate files residing within specified directories.
How I typically use it to find duplicate files
fdupes -r -n -1 -S /path/of/directory/to/search/for/dups
How I typically use it to delete duplicate files. It will prompt you for which file to delete. You can preserve multiple files by using a comma separated list of values. [...]

How to Determine the Version of Your Linux Kernel

Friday, February 8th, 2008

type “uname -r” into a terminal window

How To Clear A Terminal Screen on Linux

Monday, February 4th, 2008

Type “clear”
References
http://linux.die.net/man/1/clear

Using grep To Search For Files Containing Certian Text

Monday, February 4th, 2008

grep -lir “some text” *
-l switch outputs only the names of files in which the text occurs (instead of each line containing the text)
-i switch ignores the case
-r descends into subdirectories
References
http://www.itexpert.cz/linux-find-files-text/

sudo bang bang (sudo !!)

Saturday, August 18th, 2007

!! tells bash “repeat the last command I entered.”  How is this useful? I can’t tell you how many times I have received the error “Operation not permitted” while chmoding something. So instead of retyping the command as superuser, I can just type “sudo !!”.  This will run the previous sodoed
references
http://www.deadman.org/bash.html