the '!' command in vi spawns a shell, then pipes all of the specified lines in the buffer through the command specified after '!', replacing all input lines with the result of the command.
This searches through all CSS files in the current directory and sub-directories, matches the content between "url(...)", and prints a list of all the URLs. If you prefer to see the file the URL came from, remove the -h and --nogroup params. Show Sample Output
This command can be used to rename all the files with extension .xls( in this case) to .ods files. It can be used for other files with certain extension.
This sums up the page count of multiple pdf files without the useless use of grep and sed which other commandlinefus use. Show Sample Output
Remove all the hidden CVS merge helper files that I keep seeing in my IntellIj project
cut -f1,2 - IP range 16 cut -f1,2,3 - IP range 24 cut -f1,2,3,4 - IP range 24 Show Sample Output
Clones all repositories of given ${USERNAME}
Your computer's name is raspberrypi and you want to rename it to pita1. This command will change both the hostname and the name used for netwrk communications.
opens the output of some command as a file so this also works with graphical editors like meld, kdiff3 etc
meld <(ssh $remote_site cat .zshrc) .zshrc
https://wiki.archlinux.org/index.php/Arch_User_Repository Installing packages from the AUR is a relatively simple process. Essentially: Acquire the tarball which contains the PKGBUILD and possibly other required files, like systemd units and patches (but often not the actual code). Extract the tarball (preferably in a directory set aside just for builds from the AUR) with tar -xvf pkgname.tar.gz. Verify that the PKGBUILD and accompanying files are not malicious or untrustworthy. Run makepkg -sri in the directory where the files are saved. This will download the code, resolve the dependencies with pacman, compile it, package it, install the package, and finally remove the build-time dependencies, which are no longer needed.
uses the wonderful 'pv' command to give a progress bar when copying one partition to another. Amazing for long running dd commands Show Sample Output
This alias finds identical lines in a file (or pipe) and prints a sorted count of them (the name "sucs" descends from the first letters of the commands). The first example shows the number of logins of users; the one who logged in most often comes last. The second example extracts web client IP addresses from a log file, then pipes the result through the "sucs" alias to find out which clients are performing the most accesses. Or pipe the first column of ps(1) output through "sucs" to see how many processes your users are running. Show Sample Output
A wonderful command line utility to check the internet usage. It has got so many useful switch to display the data you want.Please visit the man page to get all the information.Get it from this website http://humdi.net/vnstat Show Sample Output
a : to keep files permissions --no-whole file : use rsync?s delta-transfer algorithm --inplace : writes the updated data directly to the destination file optionnal -> add --remove-source-files to mv instead of cp
grep -e "[sh]d[a-l]$" /proc/partitions | awk '{print $4}' # for disks only grep -e "[sh]d[a-l][0-9]\+" /proc/partitions | awk '{print $4}' # for partitions only Show Sample Output
Install Ksuperkey one command in Kubuntu. You must manually add ksuperkey to autostart in System Settings KDE.
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: