Commands tagged perl (190)

What's this?

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.

Share Your Commands


Check These Out

Generate a Google maps URL for GPS location data from digital photo
This command uses the "exiftool" command which is available here: http://www.sno.phy.queensu.ca/~phil/exiftool/ NB, there should be a degree symbol right after the first "%d" NOT a question mark. For some unknown reason, commandlinefu is not able to handle degree symbol correctly ("?")?

Throttle download speed (at speed x )
Throttle download speed $aria2c --max-download-limit=100K file.metalink Throttle upload speed $aria2c --max-upload-limit=100K file.torrent

Convert tab separate file (TSV) to JSON with jq
With this command you can convert a tab separate file (TSV) into a JSON file with jq. For example, this input.tsv i-0b9adca882e5e6326 172.16.0.188 i-088dd69e5c3624888 172.16.0.102 i-0e70eac180537d4aa 172.16.0.85 will produce the showed output.

Split a file one piece at a time, when using the split command isn't an option (not enough disk space)
bs = buffer size (basically defined the size of a "unit" used by count and skip) count = the number of buffers to copy (16m * 32 = 1/2 gig) skip = (32 * 2) we are grabbing piece 3...which means 2 have already been written so skip (2 * count) i will edit this later if i can to make this all more understandable

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Shows all packages installed that are recommended by other packages
Shows the packages installed on your system that are recomemnded by other packages. You should remove these packages.

Get a regular updated list of zombies
to omit "grep -v", put some brackets around a single character

Open Remote Desktop (RDP) from command line having a custom screen size
This example uses xfreerdp, which builds upon the development of rdesktop. This example usage will also send you the remote machine's sound.

Convert a MOV captured from a digital camera to a smaller AVI
Convert those .mov files that your digital camera makes to .avi Adjust the bitrate (-b) to get the appropriate file size. A larger bitrate produces a larger (higher quality) .avi file and smaller bitrate produces a smaller (lower quality) .avi file. Requires ffmpeg (see man page for details) (tested with canon camera MOV files) Other examples: $ffmpeg -i input.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 output.avi $ffmpeg -i input.mov -b 1024k -vcodec msmpeg4v2 -acodec pcm_u8 output.avi

dont execute command just add it to history as a comment, handy if your command is not "complete" yet


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: