Created to deal with an overzealous batch rename on our server that renamed all files to .jpg files.
The directories are created in the local host with the same structure below of a remote base directory, including the 'basedir' in case that it does not exists. You must replace user and remotehost (or IP address) with your proper values ssh will ask for the password of the user in remotehost, unless you had included properly your hostname in the remote .ssh/known_hosts file. Show Sample Output
The mogrify command is also part of the ImageMagick suite, and is made to make changes to files in place.
Keep retrying YOURCOMMAND until it succeeds. Add sleep between retries so that +c works. (Though you can always use +z and kill %1). Source: http://stackoverflow.com/a/5274386/2175968
Make it better.
Given a process name (kdiff3 in this example) that keeps auto-spawning/starting, auto-kill until it stops, assuming there is an upper limit (if not, reboot). This was beneficial after I clicked the DIFF button in a git GUI on a merge commit. 2000+ files were being opened one after the other in my diff program (kdiff3). Each time I closed one (or quit Kdiff3), the next file would be auto-opened in Kdiff3.
pts/33 is variable you can do before you send message to on which pts the user is following ssh youraccount@192.168.1.168 who
Usefull, for example, when many ports are exposed and the docker ps output looks cluttered. Show Sample Output
This will find all files in the path "." which are older than 10*24hrs (10 days). This will find any type of file.
You don't need this command often and there are other ways to test output but if you want to be sure if your router and ethernet card are working this is one way. Show Sample Output
For Solaris to obtain the same as: date+%s like in linux
Outputs the PID of any given file run from a command line... Hope it helps!
Count on a specific port (80) - FreeBSD friendly. Show Sample Output
-i sets the source file -f and -acodec both set the output to be raw audio, PCM signed 16-bit little endian
find ip address in all files in /etc directory. can be used to find any string in any directory really
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits Empty lines are deleted, before the output in format "prefix,ocurrences" Show Sample Output
Creates a PDF file where each page will be a layer from de original TIFF file.
You can apply many other filters and transformations.
convert multi_layer.tif -page a4 -compress jpg multi_page.pdf
To set the page size
convert multi_layer.tif -crop 590x790+20+30 -compress jpg multi_page.pdf
To include only a portion of the image (discard first horizontal 20 pixels and first vertical 30 pixels, include the next 590 horizontal and 790 vertical pixels)
convert multi_layer.tif -delete 1,3,5-10 -compress jpg multi_page.pdf
Discard mentioned layers
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: