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

Analyse writing style of writing style of a document
Style analyses the surface characteristics of the writing style of a document. It prints various readability grades, length of words, sentences and paragraphs. It can further locate sentences with certain characteristics. If no files are given, the document is read from standard input. style is part of "diction" package

interactive rss-based colorful commandline-fu reader perl oneliner (v0.1)
required packages: curl, xml2, html2text command is truncated, see 'sample output'

Record live sound in Vorbis (eg for bootlegs or to take audio notes)
This will record the capture channel of your soundcard, directly encoded in Ogg Vorbis, in stereo at quality 5 (I'm using this to record live jam sessions from my line input). You can choose which device to capture (eg. line input, microphone or PCM output) with $ alsamixer -V capture You can do the same thing and live encode in MP3 or FLAC if you wish, just check FLAC and LAME man pages.

This allows you to find a string on a set of files recursivly
The -r is for recursive, -F for fixed strings, --include='*.txt' identifies you want all txt files to be search any wildcard will apply, then the string you are looking for and the final * to ensure you go through all files and folders within the folder you execute it.

List all NPM global packages installed

Start a quick rsync daemon for fast copying on internal secure network
"Sample output" shows a minimalistic configuration file.

Compare copies of a file with md5
I had the problem that the Md5 Sum of a file changed after copying it to my external disk. This unhandy command helped me to fix the problem.

Find files and list them sorted by modification time
Works with files containing spaces and for very large directories.

This command provides more color variety for the rainbow-like appearance by generating random color codes from 16 to 231 for adb logcat.

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed


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: