Will find all files containing "sample" in the current directory and in the directories below.
I think it would be wise if anyone voting down left a comment indicating the reason for that action. Don't keep it to yourself. Thanks. Show Sample Output
Normally, if you just want to see directories you'd use brianmuckian's command 'ls -d *\', but I ran into problems trying to use that command in my script because there are often multiple directories per line. If you need to script something with directories and want to guarantee that there is only one entry per line, this is the fastest way i know Show Sample Output
To save all rules so that they are not lost in case of a server reboot: /etc/init.d/iptables save
read system logs of sun solaris 9
This is really not cli but I think it's neat. Show Sample Output
Autojump is cd command that learns. More info: http://wiki.github.com/joelthelion/autojump Show Sample Output
Can't remember what that one package was called? Search for it!
It's also a good idea to run
apt-get update
first.
Show Sample Output
Somehow, i prefer forcing to rm interactively to accidently rm'ing everything...
This opens up nautilus in the current directory, which is useful for some quick file management that isn't efficiently done from a terminal.
sometimes if directories are too deep, chmod -R fails... in those cases, a find comes in most handy :)
Quick and dirty way to disable the Ubuntu notifications that can be quite annoying. It prevent the notify-osd to start so you need to logout Gnome or kill it by hand to take effect.
Go to /
Kills the pid you want to kill Show Sample Output
recently some in the #linux shared this. to find out the kernel version name from the binary without using uname Show Sample Output
(port 2202)
unalias a previously aliased command Show Sample Output
David thanks for that grep inside! here is mine version: psgrep() { case ${1} in ( -E | -e ) local EXTENDED_REGEXP=1 shift 1 ;; *) local EXTENDED_REGEXP=0 ;; esac if [[ -z ${*} ]] then echo "psgrep - grep for process(es) by keyword" >&2 echo "Usage: psgrep [-E|-e] ... " >&2 echo "" >&2 echo "option [-E|-e] enables full extended regexp support" >&2 echo "without [-E|-e] plain strings are looked for" >&2 return 1 fi \ps -eo 'user,pid,pcpu,command' w | head -n1 local ARG='' if (( ${EXTENDED_REGEXP} == 0 )) then while (( ${#} > 0 )) do ARG="${1}" shift 1 local STRING=${ARG} local LENGTH=$(expr length ${STRING}) local FIRSCHAR=$(echo $(expr substr ${STRING} 1 1)) local REST=$(echo $(expr substr ${STRING} 2 ${LENGTH})) \ps -eo 'user,pid,pcpu,command' w | grep "[${FIRSCHAR}]${REST}" done else \ps -eo 'user,pid,pcpu,command' w | grep -iE "(${*})" fi }
gunzip all .gz file in current dir
Generate the iso from the disk, easily. same as "dd if=/dev/cdrom of=~/mydisk.iso"
exactly same effect as echo "$PWD" ... Show Sample Output
This is a convinient way to do it in scripts. You also want to rm the ip.php file afterwards
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: