Watch a TiVo file on your computer.
print sum of disk usage for filetype within current dir and subdirs Show Sample Output
If you just try rm -i, the file name will be interpreted as a command line switch. Many commands let you use a double hyphen '--' to say 'No more switches, the rest are file names'.
Incidentally having a file named '-i' in a directory where you use rm * will cause rm to act as if you specified '-i' on the command line.
vim -- -v
touch -- -t
cat -- -c
My script lists all users & the number of commits they made in the period, sorted alphabetically. To sort by number of commits, append a '|sort' to the end of the command. The script depends on the output format of svn log - original command didn't work for me because the string 'user' was not appearing in my output
added echo "### Crontabs for $user ####"; to make clear whose crontab is listed.
useful for human readable reports Show Sample Output
Requires installing json2yaml via npm: npm install -g json2yaml (can also pipe from stdin) Ref: https://www.npmjs.com/package/json2yaml
Disabling Gradle daemon can sometimes improve build reliability.
It tries to identify the file types in a directory and adds or replaces them with their appropriate extensions. Please, update the "file" tool before use it (last version: 5.37): https://github.com/file/file
host -i `echo $SSH_CLIENT | cut -f 1 -d \ ` | sed 's/.* domain name pointer \(.*\)\./\1/'
to reverse lookup and get the hostname.
couldn't stand previous unsortability of at jobs list Show Sample Output
'readlink -fn' gets canonical path of the file/directory without newline at the end; 'xsel -ib' copies pipelined string from STDIO to system clipboard (ready to be pasted with CTRL+V). Show Sample Output
Tested on Windows 8 w/SSH, Cygwin - it can be tricky to quote if you dont use the $(..) syntax to echo it back out Show Sample Output
Use tee -a to append.
Get two different lines like this:
sed -n '1000000p;2000000{p;q;}' < massive-log-file.log
See also: http://www.commandlinefu.com/commands/view/6043/print-just-line-4-from-a-textfile
You can get XMMS from here if it's not in your repositories: http://www.xmms.org/
This will email user@example.com a message with the body: "rsync done" when there are no processes of rsync running. This can be changed for other uses by changing $(pgrep rsync) to something else, and echo "rsync done" | mailx user@example.com to another command.
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: