commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Route output to notify-send to show nice messages on the desktop, e.g. title and interpreter of the current radio stream
how to finish command or script without any output
man 5 shadow
I think it's more reliable, because
dont show "locked" but "L" as second field on my Archlinux for a particular user.
( unixhome alternative ).
Felt like I need to win the lottery, and wrote this command so I train and develop my guessing abilities.
Displays a scrolling banner which loops until you hit Ctrl-C to terminate it.
Make sure you finish your banner message with a space so it will loop nicely.
Hi glaudiston, you can save a few chars by leaving out cat and pipe and still enjoy the added flexibility.
Yep, is hard, but is a way more flexible using pipe.
This version uses host and no ruby.
This assumes that te original's 'passwd -e' forces a user to change password; it doesn't in the versions I have.
This script will list all the files in the tarballs present on any folder or subfolder of the provided path. The while loop is for echoing the file name of the tarball before listing the files, so the tarball can be identified
handles file names with spaces and colons, fixes sort (numeric!), uses mplayer, same output format as other alternatives
I hate -exec with find, and this pattern quickly expands to other tasks.
Halt script progress until a key has been pressed.
You'll run into trouble if you have files w/ missing newlines at the end. I tried to use
PAGER='sed \$q' git blame
PAGER='sed \$q' git -p blame
to force a newline at the end, but as soon as the output is redirected, git seems to ignore the pager.
uses the previous "chr" function and uses it to create the inverse function "ord" by brute force.
It's slow, It's inelegant, but it works.
I thought I needed ord/chr to do a cartesian cipher in shell script a whie ago, but eventualy I realized I could get fancy with tr and do the same thing...
Calculates the size on disk for each package installed on the filesystem (or removed but not purged). This is missing the
| sort -rn
which would put the biggest packges on top. That was purposely left out as the command is slightly on the slow side
Also you may need to run this as root as some files can only be checked by du if you can read them ;)
After this, just type:
You need to install "beep" before this would make the beep sound.
Save it in your .profile if you want to use it later
WARNING: this command won't exit until it is successful. You won't be able to CONTROL+C out of it.
I find the ouput of ls -lR to be un-satisfying (why is the path data up there?) and find syntax to be awkward. Running 'du -a' means you will have likely to trim-off filesize data before feeding filenames to the next step in the pipe.
This command dumps all SVN repositories inside of folder "repMainPath" (not recursively) to the folder "dumpPath", where one dump file will be created for each SVN repository.
Same thing, only "head" instead of grep/egrep..
search argument in PATH
accept grep expressions
without args, list all binaries found in PATH