Cheese or other webcam software not working? Try this.
Use this command to change your network location from the OSX command line.
Use this like the cat command with the additional feature to strip out unprintable characters from the input, newlines will stay. Show Sample Output
when working under a cli sometime you need to list the files with ls but u can open gnome file browser with the command 'gnome-open .' under current directory
Use curl to invoke remote web service, where the file 'XML' is the soap payload
using "!$" will save another ton of typing than 'ALT+.' or ' .' Show Sample Output
French uses accents (???...) which may be badly displayed on computers with the wrong default character set. This command may help (sometimes)
To do this, we?ll use nano to create a new configuration file called ?virtualbox.conf?. This file will go in the ?/etc/modules-load.d? directory, which contains files that need to be loaded when Arch boots up. Since adding a file to this directory requires administrative permissions, we?ll need to precede our command with ?sudo? once again. When nano brings up the blank file, add these three lines to it: vboxguest vboxsf vboxvideo As usual, when you?re finished entering text in nano, type Control-X to exit to the command line, and answer ?y? for yes when you?re asked whether you want to save your work, and then hit ?Return? to accept the filename. At this point, reboot your machine for the Guest Additions to take effect.
You'll run into trouble if you have files w/ missing newlines at the end. I tried to use
PAGER='sed \$q' git blame
and even
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.
Based on: http://stackoverflow.com/questions/746684/how-to-search-through-all-commits-in-the-repository It would be good if anyone can shorten this to eliminate the duplicate query string. Show Sample Output
It's very similar to this thread:
http://www.commandlinefu.com/commands/view/4317/send-a-local-file-via-email
mutt your@email_address.com -s "Message Subject Here" -a attachment.jpg </dev/null
If $INBACK is set, command will launch in foreground and inverse. Very useful in script ! We could apply the inverse comportement like that : eval command ${INBACK:+&}
This example is taken from Cygwin running on Win7Ent-64. Device names will vary by platform. Both commands resulted in identical files per the output of md5sum, and ran in the same time down to the second (2m45s), less than 100ms apart. I timed the commands with 'time', which added before 'dd' or 'readom' gives execution times after the command completes. See 'man time' for more info...it can be found on any Unix or Linux newer than 1973. Yeah, that means everywhere. readom is supposed to guarantee good reads, and does support flags for bypassing bad blocks where dd will either fail or hang. readom's verbosity gave more interesting output than dd. On Cygwin, my attempt with 'readom' from the first answer actually ended up reading my hard drive. Both attempts got to 5GB before I killed them, seeing as that is past any CD or standard DVD. dd: 'bs=1M' says "read 1MB into RAM from source, then write that 1MB to output. I also tested 10MB, which shaved the time down to 2m42s. 'if=/dev/scd0' selects Cygwin's representation of the first CD-ROM drive. 'of=./filename.iso' simply means "create filename.iso in the current directory." readom: '-v' says "be a little noisy (verbose)." The man page implies more verbosity with more 'v's, e.g. -vvv. dev='D:' in Cygwin explicitly specifies the D-drive. I tried other entries, like '/dev/scd0' and '2,0', but both read from my hard drive instead of the CD-ROM. I imagine my LUN-foo (2,0) was off for my system, but on Cygwin 'D:' sort of "cut to the chase" and did the job. f='./filename.iso' specifies the output file. speed=2 simply sets the speed at which the CD is read. I also tried 4, which ran the exact same 2m45s. retries=8 simply means try reading a block up to 8 times before giving up. This is useful for damaged media (scratches, glue lines, etc.), allowing you to automatically "get everything that can be copied" so you at least have most of the data. Show Sample Output
Sort by time and Reverse to get Ascending order, then display a marker next to the a file, negate directory and select only 1 result 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: