I must monitorize a couple of ftp servers every morning WITHOUT a port-scanner Instead of ftp'ing on 100 ftp servers manually to test their status I use this loop. It might be adaptable to other services, however it may require a 'logout' string instead of 'quit'. The file ftps.txt contains the full list of ftp servers to monitorize.
Recursive grep through directory for file.
no loop, only one call of grep, scrollable ("less is more", more or less...)
Useful for Maven multimodule projects, where you want to extract all packaged jar files.
This command has been used to overwrite corrupted "entries" files of a corrupted subversion working copy. Note the --files-from input format.
This command toggles the touchpad on and off, when it's on, the right side scroll strip (annoying) and the tap-clicking are disabled, you can change this by changing occurances of 2 in the command to 0. this whole command can then be given a keyboard shortcut so that the touchpad is disableable without using a special fn key (which linux doesn't recognize on some computers) or a seperate button.
Traditionally we rewind a tape using this syntaxis:
mt -f /dev/rmt/0cbn rewind
Redirecting the dispositive to nothing as shown above is faster. Less typing is always better.
for example if you did a:
ls -la /bin/ls
then
ls !$
is equivalent to doing a
ls /bin/ls
running top command in batch mode. it is usefull if you want to redirect the output in a file. Show Sample Output
Use find's built-in ability to call programs. Alternatively, find -maxdepth 1 -type f -name "*.7z" -print0 | xargx -0 -n 1 7zr e would work, too.
Restores the keyboard so your partner who expects the keys to correspond to what they're labelled can type (in qwerty).
What to type to fix the keyboard when it's all qwerty and/or the modifier key to the left of the 'a' is doing something unexpected. In addition, I've also been known to use the altwin:meta_win and compose:ralt flags.
A command to post a message to Twitter that includes your geo-location and a short URL. The link shortening service is provide by TinyURL, the geo-location service is provided by HostIP and the IP address lookup service is provided by AppSpot. This is an upgrade of an of one of my previous contributions: http://tinyurl.com/yd2xtzv.
Connect EC2 server with public keys "/root/.ec2/id_rsa-gsg-keypair" or "/root/.ec2/keypair.pem"
Upload file to remote server using SCP
Upload file to remote server using SCP
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: