k add principle Show Sample Output
This will list all symlinks that are directories under the current directory. This will help you distinguish them from regular files.
There's too many options to number, My curiosity has forced me to make it using only sed. Maybe useful... or not... :-S
Get Google Reader unread count from the command line.
You'll have to define your auth token with $auth
Or use:
curl -s -H "Authorization: GoogleLogin auth=$(curl -sd "Email=$email&Passwd=$password&service=reader" https://www.google.com/accounts/ClientLogin | grep Auth | sed 's/Auth=\(.*\)/\1/')" "http://www.google.com/reader/api/0/unread-count?output=json" | tr '{' '\n' | sed 's/.*"count":\([0-9]*\),".*/\1/' | grep -E ^[0-9]+$ | tr '\n' '+' | sed 's/\(.*\)+/\1\n/' | bc
Show Sample Output
20characters long alpahnumeric "password" Show Sample Output
backup your files in tar archive + timestamp of backup Show Sample Output
[root@dhcppc1 windows]# cat /var/log/honeylog.log Connection from 192.168.1.71 port 21 [tcp/ftp] accepted Connection from 192.168.1.65 port 21 [tcp/ftp] accepted [root@dhcppc1 windows]# nc 192.168.1.65 21 220 ProFTPD 1.3.3c Server [ProFTPD] FAILED FTP ATTEMPT - PORT 21 *You can not run it if you have activated the ftp server.
I have a custmer's Geovision DVR installed on a closed proxi (only logme-in reaches it). I have to check for reliability but logmein hangs and is too slow a process I made the Geovision software send e-mail every minute to the www.spam.la site. All this script does is to retrieve the e-mail header from spam.la ( no login!), filtering sender, stopping at the first occurrence of the word "secs" ( the age of the last e-mail ). The result is the age of the sender's last e-mail, tiny published on top of my screen once a minute. I can refresh www.spam.la via web browser, but have other things to do. I use it inside Kalarm ( kde task schedule ) set to 1 minute repeat. It can be done without kalarm, using Watch outside the script. Try it out now using my account = geo1 ( change sender by geo1 in this script) Needs curl , osd-bin
I often find it useful to know what the exit status for a program was. This can be helpful when looking up errors by exit status or when scripting frequent commands. Taken from http://www.faqs.org/docs/abs/HTML/exit-status.html Show Sample Output
Assuming you have zenity installed, and assuming that you keep your backgrounds in ~/backgrounds, then this should work for you! :)
Assumes you've cd'd to the folder in which all your git repos reside; you could run it from ~ without -maxdepth, although that might make find take quite a while longer.
If you have several processor cores, but not that much ram, you might want to run
git config --global pack.threads 1
first, since gc-ing can eat lots of ram.
Show Sample Output
Is there somebody that uses Windows a lot that keeps messing up your Linux machine? Press Ctrl+Alt+F1-F6 and run this command after logging into a text shell!
I don't think it's possible to give a (background) colour to the tab itself, since a tab is, IIUC, simply a command to the terminal to move to the right. Nevertheless, this "highlighting" can be helpful when working with tab-separated files. Show Sample Output
Btrfs reports the inode numbers of files with failed checksums. Use `find` to lookup the file names of those inodes.
Use gstreamer to capture v4l2:///dev/video0 and show ascii art video in display.
Returns any file in the folder which would be rejected by Gmail, if you were to send zipped version. (Yes, you could just zip it and knock the extension off and put it back on the other side, but for some people this just isn't a solution) Show Sample Output
Can't see it here, but the non-breaking space is highlighted :)
Of course,
cat -t -e
achieves something similar, but less colourful.
Could add more code points from https://en.wikipedia.org/wiki/Space_%28punctuation%29#Spaces_in_Unicode
Show Sample Output
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: