Commands matching man (529)

  • or which <command> > /dev/null 2>&1 || echo Error! For example, I write which colordiff > /dev/null 2>&1 && alias diff=colordiff in my `~/.bashrc`.


    -4
    which <command> > /dev/null 2>&1 && echo Success!
    skkzsh · 2013-03-13 10:04:42 9

  • -4
    <command> 2> <file>
    mariusbutuc · 2011-02-14 14:48:11 3
  • This is based on the Windows Version of VirtualBox. From the /? ... VBoxManage clonehd | [--format VDI|VMDK|VHD|RAW|] [--variant Standard,Fixed,Split2G,Stream,ESX] [--type normal|writethrough|immutable|shareable] [--remember] [--existing] From the online help.. http://www.virtualbox.org/manual/ch08.html#id2676537 VBoxManage clonehd This command duplicates a registered virtual hard disk image to a new image file with a new unique identifier (UUID). The new image can be transferred to another host system or imported into VirtualBox again using the Virtual Media Manager; see the section called ?The Virtual Media Manager? and the section called ?Cloning disk images?. The syntax is as follows: VBoxManage clonehd | [--format VDI|VMDK|VHD|RAW|] [--variant Standard,Fixed,Split2G,Stream,ESX] [--type normal|writethrough|immutable] [--remember] where the parameters mean: format Allow to choose a file format for the output file different from the file format of the input file. variant Allow to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message. type Only honored if --remember is also specified. Defines what kind of hard disk type this image should be. remember Keep the destination image registered after it was successfully written. Show Sample Output


    -4
    vboxmanage clonehd --format VMDK <source image|uuid> <destination image>
    dreffed · 2010-10-04 16:42:12 3
  • when we work with terminal often we open man pages for help if we did some mistakes and when we want to open the man page for command we are working with this one helps as many people may be knowing that '!!' performs the last command action we use it in sudo !! to perform the last action with root previleages man !! will also be helpful and handy thanx


    -4
    man !!
    pahnin · 2010-09-24 13:38:17 6
  • Build an awk array with all commands and then select a random one at the end. This avoids spawning extra processes for counting with wc or generating random numbers. Explicitly call /bin/ls to avoid interactions with aliases.


    -4
    man $(/bin/ls /bin | awk '{ cmd[i++] = $0 } END { srand(); print cmd[int(rand()*length(cmd))]; }')
    emilsit · 2010-08-20 17:31:02 4

  • -4
    ps aux | grep [c]ommandname
    alvinx · 2009-08-17 12:29:16 11
  • Allows you to change the value of an environment variable only for the execution of the command in the line. (corrected) Show Sample Output


    -4
    VARIABLE="VALUE" COMMAND
    magmax · 2009-03-12 07:04:44 7
  • Only a few characters of the previous command are necessary.


    -4
    !previous_command
    jcgam69 · 2009-02-20 18:07:03 10
  • # Small for loop, that can list files in dir, and after that executes # [COMMAND] of your choice, usefull for example rename, move, tar etc.. # change cmd's for different results :)


    -4
    for FILE in $(ls); do [COMMAND]; done
    stinger · 2009-02-17 14:42:46 11

  • -4
    Place a filename at the beginning of the line to make it easier to edit the search at the end of the command.
    iveney · 2009-02-07 12:03:19 12

  • -5
    man inet
    fanchangyong · 2014-05-05 14:43:11 7
  • Read all chapters up to 'Jumping', improve your effectiveness of wirking in terminal. Most useful are the Moving and Searching commands


    -5
    man <command> then type h
    stanix · 2011-10-16 09:49:56 18
  • Credit goes to "eightmillion" Show Sample Output


    -5
    removedir(){ read -p "Delete the current directory $PWD ? " human;if [ "$human" = "yes" ]; then [ -z "${PWD##*/}" ] && { echo "$PWD not set" >&2;return 1;}; rm -Rf ../"${PWD##*/}"/ && cd ..; else echo "I'm watching you" | pv -qL 10; fi; }
    oshazard · 2010-01-20 08:01:21 9
  • It's hard to beat C. This is just slightly faster than the bc version on my machine. real 0m26.856s user 0m25.030s sys 0m0.024s Requirements: libgmp headers, gcc. Show Sample Output


    -5
    gcc -x c -o /tmp/out - -lgmp <<< '#include <stdlib.h> ... SEE SAMPLE OUTPUT FOR FULL COMMAND
    hank · 2009-09-10 02:10:46 8

  • -6
    figlet -f roman message
    ekinertac · 2013-04-23 02:25:39 12
  • Work only with bash and apt-file installed. When it found an unknow command, it will search for a file named "scribus" (in my example), in a folder named bin and then install the corresponding package. After installation, it will run the command. Usefull juste after reinstalling linux and missing lot of package. Show Sample Output


    -7
    function command_not_found_handle(){ apt-get install $( apt-file search "$1" | grep bin | grep -w "$1" | head -n1 | cut -d ':' -f 1 ) && $* ; }
    Juluan · 2011-04-06 19:58:32 8
  • Yep, now you can finally google from the command line! Here's a readable version "for your pleasure"(c): google() { # search the web using google from the commandline # syntax: google google query=$(echo "$*" | sed "s:%:%25:g;s:&:%26:g;s:+:%2b:g;s:;:%3b:g;s: :+:g") data=$(wget -qO - "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=$query") title=$(echo "$data" | tr '}' '\n' | sed "s/.*,\"titleNoFormatting//;s/\":\"//;s/\",.*//;s/\\u0026/'/g;s/\\\//g;s/#39\;//g;s/'amp;/\&/g" | head -1) url="$(echo "$data" | tr '}' '\n' | sed 's/.*"url":"//;s/".*//' | head -1)" echo "${title}: ${url} | http://www.google.com/search?q=${query}" } Enjoy :) Show Sample Output


    -7
    The command is too big to fit here. :( Look at the description for the command, in readable form! :)
    hunterm · 2011-01-05 02:45:28 7
  • A very interesting man page!


    -7
    man ettercap
    Abiden · 2010-01-29 14:28:38 5
  • This command kills all processes with 'SomeCommand' in the process name. There are other more elegant ways to extract the process names from ps but they are hard to remember and not portable across platforms. Use this command with caution as you could accidentally kill other matching processes! xargs is particularly handy in this case because it makes it easy to feed the process IDs to kill and it also ensures that you don't try to feed too many PIDs to kill at once and overflow the command-line buffer. Note that if you are attempting to kill many thousands of runaway processes at once you should use 'kill -9'. Otherwise the system will try to bring each process into memory before killing it and you could run out of memory. Typically when you want to kill many processes at once it is because you are already in a low memory situation so if you don't 'kill -9' you will make things worse


    -7
    ps axww | grep SomeCommand | awk '{ print $1 }' | xargs kill
    philiph · 2009-02-28 17:48:51 11
  • This decompresses the file and sends the output to STDOUT so it can be grepped. A good one to put in loops for searching directories of gzipped files, such as man pages. Show Sample Output


    -7
    zcat /usr/share/man/man1/grep.1.gz | grep "color"
    root · 2009-02-04 09:38:45 54
  • This works in multiple unixes, not only linux, for different paths. On solaris, if you do not have which, you can use: ksh whence -p anypath/a_command.sh | sed "s|^./|$(pwd)|" ksh whence -p Show Sample Output


    -8
    which any_path/a_command.sh | sed "s|^./|$(pwd)|"
    keymon · 2011-09-22 10:38:56 6
  • I know how hard it is to find an old command running through all the files because you couldn't remember for your life what it was. Heres the solution!! Grep the history for it. depending on how old the command you can head or tail or if you wanted to search all because you cannot think how long ago it was then miss out the middle part of the command. This is a very easy and effective way to find that command you are looking for.


    -9
    cat .bash_history | tail -100 | grep {command}
    techie · 2013-04-10 10:40:52 8
  • Instead of using: 0,15,30,45 * * * * /path/to/command


    -9
    */15 * * * * /path/to/command
    sharfah · 2009-08-30 14:53:08 3

  • -9
    Convert UNIX time to human readable date
    bytor4232 · 2009-03-30 05:03:31 7
  • Display man page in plain text


    -12
    man bash | col -b
    suxer · 2009-09-10 00:45:27 3
  • ‹ First  < 19 20 21 22 > 

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

Find all files of a type and copy them elsewhere while keeping intact their full directory structure using find and cpio
.flac is the filetype. /Volumes/Music/FLAC is the destination.

Use Linux coding style in C program
put "-linux" option into $HOME/.indent.pro to make it default

Shortcut to find files with ease.
It looks for files that contains the given word as parameter. * case insensitive * matches files containing the given word.

AWK command to extract log files between dates

Edit a PDF's metadata using exiftool
Edit the pdf file foo.pdf's metadata. -overwrite_original overwrites the original file (w/o it exiftool creates a new file)

Single words from Amazon Kindle 3 notes
You can use any dictionary you want, in any language. This command will output all single-word annotations that you have underlined in your Kindle device (provided the file) given a list of language-specific words. If you want to learn vocabulary, this command is ideal.

generate a telephone keypad
seems a useless command ...

Text graphing ping output filter
Nasty perl one-liner that provides a sparkline of ping times. If you want a different history than the last 30, just put that value in. It (ab)uses unicode to draw the bars, inspired by https://github.com/joemiller/spark-ping . It's not the most bug-free piece of code, but what it lacks in robustness it makes up for in capability. :) If anyone has any ideas on how to make it more compact or better, I'd love to hear them. I included a ping to google in the command just as an example (and burned up 10 chars doing it!). You should use it with: $ ping example.com | $SPARKLINE_PING_COMMAND

scroll file one line at a time (w/only UNIX base utilities)
usage examples ls largedir |rd lynx -dump largewebsite.com |rd rd < largelogfile

Reuse last parameter
Reuse the last parameter of the previous command line


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: