Commands by bazza (0)

  • bash: commands not found

What's this?

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.

Share Your Commands


Check These Out

rsync over ssh via non-default ssh port
tested on cygwin and Fedora 9 . good to remember for those jobs where you cannot set a site-specific connect option in your ~/.ssh/config file.

run remote linux desktop
First of all you need to run this command. X :12.0 vt12 2>&1 >/dev/null & This command will open a X session on 12th console. And it will show you blank screen. Now press Alt + Ctrl + F7. You will get your original screen. Now run given command "xterm -display :12.0 -e ssh -X user@remotesystem &". After this press Alt + Ctrl + F12. You will get a screen which will ask you for password for remote linux system. And after it you are done. You can open any window based application of remote system on your desktop. Press Alt + Ctrl + F7 for getting original screen.

Show all symlinks

Binary clock
displays current time in "binary clock" format (loosely) inspired by: http://www.thinkgeek.com/homeoffice/lights/59e0/ "Decoding": 8421 .... - 1st hour digit: 0 *..* - 2nd hour digit: 9 (8+1) .*.. - 1st minutes digit: 4 *..* - 2nd minutes digit: 9 (8+1) Prompt-command version: PROMPT_COMMAND='echo "10 i 2 o $(date +"%H%M"|cut -b 1,2,3,4 --output-delimiter=" ") f"|dc|tac|xargs printf "%04d\n"|tr "01" ".*"'

Kill a broken ssh connection
This is useful for example if you are on ssh in a server and the server goes down without letting you out. This is part of a larget sets of escape sequences provided by ssh. You can find them with ~? Here's the list: ~. - terminate connection (and any multiplexed sessions) ~B - send a BREAK to the remote system ~C - open a command line ~R - request rekey ~V/v - decrease/increase verbosity (LogLevel) ~^Z - suspend ssh ~# - list forwarded connections ~& - background ssh (when waiting for connections to terminate) ~? - this message ~~ - send the escape character by typing it twice (Note that escapes are only recognized immediately after newline.)

Make vim open in tabs by default (save to .profile)
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.

Get a regular updated list of zombies
to omit "grep -v", put some brackets around a single character

scheduled jobs

resolve short urls
since the most url shorteners respond with a header containing the Location: ... this works with most common shorteners

convert all flac files in a folder to mp3 files with a bitrate of 192 kbps


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: