All commands (14,187)

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

backup and synchronize entire remote folder locally (curlftpfs and rsync over FTP using FUSE FS)
connect to a remote server using ftp protocol over FUSE file system, then rsync the remote folder to a local one and then unmount the remote ftp server (FUSE FS) it can be divided to 3 different commands and you should have curlftpfs and rsync installed

Convert entire audio library in parallel
Uses parallel processing Reiteration of my earlier command https://www.commandlinefu.com/commands/view/15246/convert-entire-music-library Usage lc Old_Directory New_DIrectory Old_Format New_Format lc ~/Music ~/Music_ogg mp3 ogg

histogram of file size

resize all JPG images in folder and create new images (w/o overwriting)
Convert all jpegs in the current directory into ~1024*768 pixels and ~ 150 KBytes jpegs

Find all videos under current directory using MIME a.k.a not using extension
Videos are found using their MIME type. Thus no need to for an extension for the video file. This is a efficent version of "jnash" cmd (4086). Thanks for jnash. This cmd will only show video files while his cmd show files having "video" anywhere in path.

Determine status of a RAID write-intent bitmap
Report information about a bitmap file.

backup a directory in a timestamped tar.gz
creates a tar.gz with a name like: backup20090410_173053.tar.gz of a given directory. this file was made 10 April 2009 at 5:30:53pm see date's man page to customize the timestamp format

clone directory structure
dir1 and all its subdirs and subdirs of subdirs ... but *no files* will be copied to dir2 (not even symbolic links of files will be made). To preserve ownerships & permissions: $ cp -Rps dir1 dir2 Yes, you can do it with $ rsync -a --include '*/' --exclude '*' /path/to/source /path/to/dest too, but I didn't test if this can handle attributes correctly (experiment rsync command yourself with --dry-run switch to avoid harming your file system) You must be in the parent directory of dir1 while executing this command (place dir2 where you will), else soft links of files in dir2 will be made. I couldn't find how to avoid this "limitation" (yet). Playing with recursive unlink command loop maybe? PS. Bash will complain, but the job will be done.

Download a file securely via a remote SSH server
This command will download $file via server. I've used this when FTP was broken at the office and I needed to download some software packages.

edit hex mode in vim
return to normal mode from hex mode :%!xxd -r


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: