svn up -r PREV # revert

Quick and Temporary Named Commands

* Add comment with # in your command * Later you can search that command on that comment with CTRL+R In the title command, you could search it later by invoking the command search tool by first typing CTRL+R and then typing "revert"
Sample Output
U    index.php
Updated to revision 12401.

These Might Interest You

  • It executes commands as arguments to ssh, avoiding problematic shell expansions, without the need of writing the commands in question to a temporary file, just reading them from STDIN. Show Sample Output


    1
    echo "properly_escaped_command" | ssh user@host $(< /dev/fd/0)
    trantorvega · 2012-07-18 10:36:07 0
  • A Quick variation to the latest commands list with the new-lines skipped. This is faster to read.


    2
    wget -O - http://www.commandlinefu.com/commands/browse/rss 2>/dev/null | awk '/\s*<title/ {z=match($0, /CDATA\[([^\]]*)\]/, b);print b[1]} /\s*<description/ {c=match($0, /code>(.*)<\/code>/, d);print d[1]} ' | grep -v "^$"
    nikunj · 2010-06-29 16:22:03 1
  • Sometimes you have a script that needs and inputfile for execution. If you don't want to create one because it may contain only one line you can use the ` mysql -uuser -ppass dbname < <(echo "SELECT * FROM database;") This can be very usefull when working with mysql as I showed in the example code above. This will create a temporary file that is used to execute mysql and for example select all entrys from a specific database.


    9
    any_script.sh < <(some command)
    cb0 · 2010-02-21 18:44:33 13
  • A quick alias I use right before logging into a server so that I have a log of the transactions as well as the ability to re-connect from another computer. Useful for when your boss says "what commands did you run again on that server?" and you had already closed the terminal ;) I wrapped it in a script now, with more features, but this is the heart of it. Never leave home without it.


    1
    alias m='screen -S $$ -m script'
    robinsonaarond · 2015-10-01 18:07:18 1
  • prints and follows the systemd logfile entires for the DNS bind named.service unit (on Arch linux, your distro bind service may have a different name) Show Sample Output


    0
    journalctl --unit=named --follow
    anomalyst · 2014-08-07 04:02:58 0
  • Makes a partition in ram which is useful if you need a temporary working space as read/write access is fast. Be aware that anything saved in this partition will be gone after your computer is turned off.


    184
    mount -t tmpfs tmpfs /mnt -o size=1024m
    ajrobinson · 2009-02-06 00:33:08 8

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

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



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: