Commands by pqatsi (8)

  • Entire command: sudo qemu-system-x86_64 -enable-kvm -cpu host -M q35 -m 2G -smp 4 --bios /usr/share/edk2/ovmf/OVMF_CODE.fd -drive id=cdrom,file=/dev/sr1,if=none,media=cdrom,format=raw,readonly=on -drive id=disk,file=/dev/md126,if=none,format=raw -device virtio-blk-pci,drive=cdrom -device virtio-blk-pci,drive=disk -device VGA,vgamem_mb=64,xres=800,yres=600


    -2
    sudo qemu-system-x86_64 ...
    pqatsi · 2022-09-02 20:07:02 502
  • After install https://linux.dell.com/repo/community/openmanage/ (Complete, all), install these packages or you will get segfaults on update and it will fail.


    0
    apt install raidcfg dtk-scripts syscfg smbios-utils sfcb cim-schema dcism
    pqatsi · 2020-05-29 06:49:23 157
  • 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 162

  • 0
    dmesg -L=always | less -r
    pqatsi · 2018-01-19 13:04:43 21

  • 0
    dd if=<image> of=/dev/sdx bs=4M iflag=direct,fullblock oflag=direct status=progress
    pqatsi · 2018-01-08 00:42:10 24

  • 0
    echo "IPv4: $(curl -s4 ip.appspot.com)" ; echo "IPv6: $(curl -s6 ip.appspot.com)"
    pqatsi · 2017-12-26 12:52:38 19
  • Changelog: Changing ping to "ping -A -c1 -w10" - targeting a quick and reliable ping, even on slow networks.


    0
    ADDR=127.0.0.1 ; for i in `seq 1300 1501`; do echo -ne "Pacote de tamanho $i bytes" ; ping -A -c1 -w10 -s $i -Mdo $ADDR 2>&1 > /dev/null || break ; echo -ne "\r\033[2K" ; done ; echo -ne "\r\033[2K" ; echo -e "MTU bem sucedido com `expr $i`"
    pqatsi · 2015-12-18 18:11:47 11
  • Tests connection speed over HTTP request. Can use a lot of http mirrors of SAME file (Useful for test with Ubuntu mirrors, as example) and the split will be done opening connections in all urls if possible. -s Split connections in N number MAX=16 -j Set max concurrent downloads, must be equal to -s or will be restricted to this number. -x Set max connection per server, recommended to be the same of split. -k Min Split Size, default is 20MB, usefull to really force more splited connections over same file -d Directory to save the "file", in this case, /dev -o Points output to null --file-allocation=none Do not attempt to prealocate the file. --allow-overwrite=true Overwrite to /dev/null. Recommend use "rm /dev/null.aria2" after if runned as root. Show Sample Output


    0
    aria2c -s16 -j16 -x16 -k1M -d /dev -o null --file-allocation=none --allow-overwrite=true <url>
    pqatsi · 2015-06-18 13:13:12 9

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

AWK command to extract log files between dates

batch convert Nikon RAW (nef) images to JPG
converts RAW files from a Nikon DSLR to jpg for easy viewing etc. requires ufraw package

Print a list of standard error codes and descriptions.
Written by jmcnamara Taken from http://www.perlmonks.org/?node_id=274896

sort through source to find most common authors

Cut the first 'N' characters of a line
Saves one character, the original is probably clearer

Coping files, excluding certain files
Preserve file structure when coping and exclude some file o dir patterns

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

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"

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Perl Command Line Interpreter
Read, Evaluate, Print, Loop - REPL


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: