commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
pvl 'link1' 'link2' 'link3'
Play Youtube, Vimeo, etc links without visual elements.
Great for music videos when you just want the audio.
You can control mplayer with this!
Hit Ctrl-C twice to exit (if you're playing multiple files)
As of this writing, this requires a fairly recent version of util-linux, but is much simpler than the previous alternatives. Basically, lsblk gives a nice, human readable interface to all the blkid stuff. (Of course, I wouldn't recommend this if you're going to be parsing the output.) This command takes all the fun out of the previous nifty pipelines, but I felt I ought to at least mention it as an alternative since it is the most practical.
Don't want to open up an editor just to view a bunch of XML files in an easy to read format? Now you can do it from the comfort of your own command line! :-) This creates a new function, xmlpager, which shows an XML file in its entirety, but with the actual content (non-tag text) highlighted. It does this by setting the foreground to color #4 (red) after every tag and resets it before the next tag. (Hint: try `tput bold` as an alternative). I use 'xmlindent' to neatly reflow and indent the text, but, of course, that's optional. If you don't have xmlindent, just replace it with 'cat'. Additionally, this example shows piping into the optional 'less' pager; note the -r option which allows raw escape codes to be passed to the terminal.
A great command to assign to an alias, allowing you to git diff the last two commits in git.
Scope should have the Rigol Ultravision Technology otherwise it won't accept the command. ImageMagic is required. Scope sends a 1.1M BMP file and converted to PNG it's only 18-20K
This command uses the reachable_host as a proxy; redirecting your request to the unreachable_host.
The main advantage is that you need only one ssh key. You copy the public part to both servers and you can access the unreachable_host without a problem.
Also, you can put this on ~/.ssh/config to access the unreachable_host directly:
ProxyCommand ssh [email protected]_host -W %h:%p
and, then, just ssh [email protected]_host.
works for Powershot SD780 IS
works for Powershot SD780 IS
pm2 is a process manager that includes a module system to install powerful and small softwares
In cases when the user is following a log file that rotates then it is advisable to use the -F option as it keeps following the log even when it is recreated, renamed, or removed as part of log rotation.
To interrupt tail while it is monitoring, break-in with Ctrl+C.
Replace all instances of "A" with "B" in file "source" saved as file "destination".
!! IF A/B is multi-byte, then separate bytes with spaces like so: "s/20\ 0A/00/g".
Plays whitenoise from /dev/urandom.
list all txt files order by time, newest first
Find and replace specific characters in a single line in multiple files with sed.
So, I'm using a CentOS VM in VirtualBox, and created four new disks in the SCSI controller.
The VM created the folders:
Using a 'for loop' all disks are partitioned for LVM.