For OS X/bsd; probably messy
Additionally you cal also print the current directory in the end. cdb(){ range=$(eval "echo '{1..$1}'"); toPrint="'../%.0s' $range"; printfToEval=$(echo "printf $toPrint"); toCd=$(eval $printfToEval); eval "cd $toCd"; pwd; } Show Sample Output
Command will succeed n% of the time. ran 75 will cause command to succeed 75% of the time. No argument will cause it to succeed 50% of the time. Show Sample Output
Shows the WiFi signal strength without having to display thousands of lines Show Sample Output
This command does something similar using dig which is usually more available. Show Sample Output
I had trouble with accent I could do a simple mv by hand but it is not efficient. I found this online http://www.unix.com/shell-programming-and-scripting/158635-remove-spanish-accent-file-name.html but I could not specify the accented letter direcly because it is not in the same encoding as my cli so I changed the char for their octal value. to add accent I use this table http://linux.about.com/library/cmd/blcmdl7_iso_8859-1.htm and add the values to the tr part. the other "duplicates" where not working for me. comment to help me better this script. :) Show Sample Output
Make a backup of the data you have changed last. After running only type backup in new cmd and all files will be in a tar archive in /tmp.
Works almost every time.
but can't diff dir...
This sequence of pipes will strip the last newline and send the remainder to the X11 clipboard. I have it as: alias clipb='perl -pe "chomp if eof" | xclip -selection c' so I can just do "echo hello | clipb" Multi-line texts will keep their internal newlines, but the last newline will be removed. This usually makes most sense. Show Sample Output
Returns the global weighted BTC rate in EUR. Requires the "jq" JSON parser. Show Sample Output
Echo $PATH isn't very easy to read. Show Sample Output
I have modified the original one-liner to allow it to manage multiple PIDs. However, I haven't found the way it can work properly with the watch command. NOTE: brace expand must be activated via "set -B" in order to this script can work. Show Sample Output
Force computer "idle" state when lid is closed, regardless of inhibitors (power manager) in place, and runs logind preset action (sleep, suspend...). See http://www.freedesktop.org/software/systemd/man/logind.conf.html
This command validates if exist any character different in 0-255 and dot. If any characters different is typed the error menssage is showing. Show Sample Output
In Thunderbird open the settings for your email account, mark the checkbox for 'Attach the signature from a file instead' and use the filename '~/mailsignature.txt' Now every time when you open a terminal you see the fortune displayed in the terminal and the mail signature gets regenerated. Show Sample Output
shell order of operation example which calculates: x = number of physical CPU's y = number of cores per CPU 2(x * y) + 1 = CPU load limit Show Sample Output
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: