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

Run a command only when load average is below a certain threshold
Good for one off jobs that you want to run at a quiet time. The default threshold is a load average of 0.8 but this can be set using atrun.

Convert spaces in file names to underscores

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"

list folders containing less than 2 MB of data
This command will search all subfolders of the current directory and list the names of the folders which contain less than 2 MB of data. I use it to clean up my mp3 archive and to delete the found folders pipe the output to a textfile & run: $ while read -r line; do rm -Rv "$line"; done < textfile

Burn CD/DVD from an iso, eject disc when finished.
cdrecord -scanbus will tell you the (x,y,z) value of your cdr (for example, mine is 3,0,0)

Run a command for blocks of output of another command
The given example collects output of the tail command: Whenever a line is emitted, further lines are collected, until no more output comes for one second. This group of lines is then sent as notification to the user. You can test the example with $ logger "First group"; sleep 1; logger "Second"; logger "group"

ASCII art of yourself
Use libcaca to render ascii chars on the webcam input... or don't.

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

a function to create a box of '=' characters around a given string.
First argument: string to put a box around. Second argument: character to use for box (default is '=') Same as command #4948, but shorter, and without the utility function.

Backup all mysql databases to individual files on a remote server
It grabs all the database names granted for the $MYSQLUSER and gzip them to a remote host via SSH.


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: