Commands by outly3r (1)

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

Backup all starred repositories from Github

all out
How to force a userid to log out of a Linux host, by killing all processes owned by the user, including login shells:

grep (or anything else) many files with multiprocessor power
Parallel does not suffer from the risk of mixing of output that xargs suffers from. -j+0 will run as many jobs in parallel as you have cores. With parallel you only need -0 (and -print0) if your filenames contain a '\n'. Parallel is from https://savannah.nongnu.org/projects/parallel/

Show whats going on restoring files from a spectrum protect backup
spectrum protect's dsmc command shows file names and total amount of restore. This command shows which files are actually open and their siz in GB and highlights the change to the previous output

find out which directory uses most inodes - list total sum of directoryname existing on filesystem

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Quick directory bookmarks
Set a bookmark as normal shell variable $ p=/cumbersome/path/to/project To go there $ to p This saves one "$" and is faster to type ;-) The variable is still useful as such: $ vim $p/ will expand the variable (at least in bash) and show a list of files to edit. If setting the bookmarks is too much typing you could add another function $ bm() { eval $1=$(pwd); } then bookmark the current directory with $ bm p

change microdvd subtitles framerate
this command example converts to 25 fps subtitles that were originally created for 24 fps movie

pipe commands from a textfile to a telnet-server with netcat
sends commands specified in $commandfile to the telnet-server specified by $telnetserver. to have newlines in $commandfile interpreted as ENTER, save the file in CR+LF (aka "Windows-Textfile") format. if you want to save the output in a separate file, use: $nc $telnetserver 23 < $commandfile > $resultfile

files and directories in the last 1 hour
added alias in ~/.bashrc alias lf='find ./* -ctime -1 | xargs ls -ltr --color'


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: