All commands (14,187)


  • 0
    openssl rsa -in privateKey.key -check
    aysadk · 2018-04-04 13:33:00 168

  • 0
    openssl req -text -noout -verify -in CSR.csr
    aysadk · 2018-04-04 13:32:43 168

  • 0
    openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
    aysadk · 2018-04-04 13:32:20 172

  • 0
    openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes
    aysadk · 2018-04-04 13:32:02 236

  • 0
    openssl x509 -outform der -in certificate.pem -out certificate.crt
    aysadk · 2018-04-04 13:31:43 169

  • 0
    openssl x509 -inform der -in certificate.cer -out certificate.pem
    aysadk · 2018-04-04 13:31:06 170

  • 0
    openssl s_client -connect www.paypal.com:443
    aysadk · 2018-04-04 13:30:39 169
  • openssl x509 -noout -modulus -in certificate.crt | openssl md5 openssl rsa -noout -modulus -in privateKey.key | openssl md5 openssl req -noout -modulus -in CSR.csr | openssl md5


    0
    openssl x509 -noout -modulus -in certificate.crt | openssl md5 openssl rsa -noout -modulus -in privateKey.key | openssl md5 openssl req -noout -modulus -in CSR.csr | openssl md5
    aysadk · 2018-04-04 13:29:59 161
  • Update method: 1) Find you current version and release in https://esxi-patches.v-front.de/ESXi-6.5.0.html (You can copy the Build number and Control+F in the page). 2) Run this command release per release, changing the with the name of Imageprofile. As example: esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION[168/1029] depot-index.xml -p ESXi-6.5.0-20180304001-standard This way is needed because updates arent cumulative, so need to do one by one. Show Sample Output


    0
    esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION[168/1029] depot-index.xml -p <Release>
    pqatsi · 2018-04-03 13:26:58 168
  • Proxy remote mysql with local port.


    0
    ssh -T -N -L 23306:localhost:3306 root@mysql.domain.com
    jackqt · 2018-04-02 05:34:28 168

  • 1
    echo "[{"Name": "bar"}]" | python -c 'import json,sys;obj=json.load(sys.stdin);print(obj[0]["Name"]);')
    moerin · 2018-03-31 21:31:53 164

  • 1
    genisoimage -o bastion-602-jpa.iso -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -r -R .
    leatherface · 2018-03-30 12:54:26 169

  • 0
    clear && sleep 5s && curl --silent "http://www.commandlinefu.com/commands/by/dunryc" | grep '<div class="command">'|sed 's/......$//'|sed 's/^.....................................//'|recode html..ascii|awk 'ORS="\n\n\n\n"'
    dunryc · 2018-03-28 20:17:40 177

  • 0
    clear && curl --silent http://www.commandlinefu.com/commands/by/dunryc | grep "div class" | grep command |tr '>' '\n' | grep -v command |sed 's/.....$//'
    dunryc · 2018-03-28 19:16:14 162

  • 0
    curl -s https://api.github.com/users/tuxcanfly/repos | jq -r 'map(select(.fork == false)) | map(.url) | map(sub("https://api.github.com/repos/"; "git clone git@github.com:")) | @sh' | xargs -n1 sh -c]
    tuxcanfly · 2018-03-23 01:05:29 172
  • bitbucket paginates at around 1360 characters, so if you have several pages of repos in git hub you can just add "?page={1..4}" the url used to get all the repos. you can also use -v for the deletion curl if you want to see the response from the server.


    1
    for repo in `curl -s -u 'USERNAME:PASSWORD' -X GET -H "Content-Type: application/json" 'https://api.bitbucket.org/2.0/repositories/USER|jq -r .values[].links.self.href`; do curl -s -u 'USERNAME:PASSWORD' -X DELETE $repo;done
    gargolito · 2018-03-21 22:34:28 166
  • curl inet-ip.info -> 113.33.232.62\n curl inet-ip.info/ip -> 113.33.232.62 curl inet-ip.info/json -> JSON print curl inet-ip.info/json/indent -> JSON pretty print curl inet-ip.info/yaml -> YAML format curl inet-ip.info/toml -> TOML format http://inet-ip.info Show Sample Output


    1
    curl inet-ip.info
    masahide · 2018-03-19 21:08:39 38
  • Here is an alternative that support unicodes, using echo: It is using the \c flag, meaning no new line for the echo option -e. You can replace the = with any unicode character. Or to do the same into a PHP bash script: shell = system("tput cols"); for( $i= 0 ; $i < $shell ; $i++ ){ echo "█"; } Show Sample Output


    0
    for ((i=0; i<$(tput cols); i++)); do echo -e "=\c" ;done
    K33st · 2018-03-19 19:37:02 28
  • To HUNT for all the important stuffs. TRUST EL TRAPPER Works every time!


    0
    ls -ltrapR
    K33st · 2018-03-19 18:15:51 26
  • In case you have a PSD file with CMYK attribute and you need a working image


    0
    convert <input.psd> -channel RGBA -alpha Set -colorspace rgb <output.png>
    ludenticus · 2018-03-19 14:30:30 27
  • Autossh maintains a Tunnel opened. This example adds connectivity through a HTTP Proxy


    0
    autossh -o "ProxyCommand nc --proxy <proxy_hostname_or_ip>:<proxy_port> %h %p" -M 20000 -f -N <hostname_or_ip> -p 443 -R 2222:localhost:22 -C
    imjoseangel · 2018-03-13 05:56:49 62

  • 0
    access wifi password through terminal (osx)
    ctcrnitv · 2018-03-12 06:40:38 25
  • This command renames the file 'filename' to 'filename.old' using shell expansion. Same as typing "mv filename filename.old".


    -1
    mv filename{,.old}
    BELzEBUB · 2018-03-08 12:41:18 27
  • This command builds upon some of the original commands posted here. Additions - The control sequence \x1b(B which selects the default character set ASCII. - Either the \x1B style escape sequence or the \033. - Case insensitivity by using 'I' to include \x1b, \x1B escapes and a-zA-Z in the latter part Tested extensively on makefile unbuffered output where the above additions proved necessary


    0
    sed -r "s/(\x1B|\033)(\(B|\[([0-9]{1,2}(;[0-9]{1,2})?)?[A-Z])//Ig"
    DMaxmatician · 2018-03-08 00:49:39 25

  • 0
    apt list --upgradable
    rschulze · 2018-03-06 17:45:01 25
  • ‹ First  < 29 30 31 32 33 >  Last ›

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

ISO info
Get details about an ISO image , without burning it or mounting it .

Generate a random password 30 characters long

Get AWS temporary credentials ready to export based on a MFA virtual appliance
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token. This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use: `awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'` You must adapt the command line to include: * $MFA_IDis ARN of the virtual MFA or serial number of the physical one * TTL for the credentials

Alias for lazy tmux create/reattach

Get the /dev/disk/by-id fragment for a physical drive
Substitute for #11720 Can probably be even shorter and easier.

Another Matrix Style Implementation

Play all files in the directory using MPlayer
Skip forward and back using the < and > keys. Display the file title with I.

permanently let grep colorize its output
This will create a permanent alias to colorize the search pattern in your grep output

Re-read partition table on specified device without rebooting system (here /dev/sda).

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"


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: