All commands


  • Plain old `unzip` won't unzip output coming from STDOUT the ZIP file format includes a directory (index) at the end of the archive. This directory says where, within the archive each file is located and thus allows for quick, random access, without reading the entire archive. This would appear to pose a problem when attempting to read a ZIP archive through a pipe, in that the index is not accessed until the very end and so individual members cannot be correctly extracted until after the file has been entirely read and is no longer available. As such it appears unsurprising that most ZIP decompressors simply fail when the archive is supplied through a pipe. The directory at the end of the archive is not the only location where file meta information is stored in the archive. In addition, individual entries also include this information in a local file header, for redundancy purposes. From the `jar` manpage: > The jar command is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. JAR is smart enough to know how to handle these local file headers when the index is unavailable when reading through the pipe. (Most of the explanation in this description is taken from https://serverfault.com/a/589528/314226 , though they recommend using `bsdtar`, but that is not always available on systems) Show Sample Output

    ?? cat foo.zip | jar xv extracted: foo/bae.txt
    extracted: foo/bar.txt
    extracted: foo/baz.txt
    extracted: foo/boo.txt
    

    bbbco · 2019-01-14 22:08:19 0

  • nmap -p0-65535 192.168.1.254 -T5

    aysadk · 2019-01-09 14:55:18 0

  • openssl req -out CSR.csr -key privateKey.key -new

    aysadk · 2019-01-07 22:48:34 0

  • openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt

    aysadk · 2019-01-07 22:46:39 0

  • openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

    aysadk · 2019-01-07 22:44:29 0

  • openssl x509 -x509toreq -in certificate.crt -out CSR.csr -signkey privateKey.key

    aysadk · 2019-01-07 22:43:23 0

  • wodny · 2019-01-05 16:25:57 1

  • calc(){ awk "BEGIN{ print $* }" ;}; calc "((3+(2^3)) * 34^2 / 9)-75.89"

    podiiii · 2018-12-25 04:11:14 0

  • masscan 0.0.0.0/0 -p8080,8081,8082 --max-rate 100000 --banners --output-format grepable --output-filename /tmp/scan.xt --exclude 255.255.255.255

    aysadk · 2018-12-22 21:33:44 1

  • cat url.list | parallel -j 8 wget -O {#}.html {}

    arthurwayne · 2018-12-22 08:14:06 0

  • echo "tell application \"Terminal\"\n\t set its current settings of selected tab of window 1 to settings set \"$PROFILE\"\n end tell"|osascript;

    christoph000 · 2018-12-19 23:48:12 0

  • If you have more than one SINK

    pactl set-sink-volume @DEFAULT_SINK@ +5%

    wdog · 2018-12-19 10:26:30 0

  • echo | openssl s_client -showcerts -servername google.com -connect gnupg.org:443 2>/dev/null | openssl x509 -inform pem -noout -text

    wuziduzi · 2018-12-19 03:55:41 1

  • avconv -i SOURCE.mp4 -f segment -c:v copy -bsf:v h264_mp4toannexb -an -reset_timestamps 1 OUTPUT_%05d.h264

    alikhalil · 2018-12-18 05:13:38 0

  • Instead of using clipboard register after opening vim we can use this command in order to edit clipboard content. For those who already have "xclip -i -selection clipboard -o" aliased to pbpaste it is yet more simple, just: alias vcb='pbpaste | vim -'

    alias vcb='xclip -i -selection clipboard -o | vim -'

    voyeg3r · 2018-12-15 11:43:15 0

  • bzip2recover damaged_file_name

    captainbal00 · 2018-12-14 18:44:25 0

  • captainbal00 · 2018-12-14 18:41:47 0

  • captainbal00 · 2018-12-14 18:40:47 0

  • cat data.json | json-to-js | pbcopy

    minademian · 2018-12-14 15:55:41 0

  • minademian · 2018-12-14 11:01:40 0

  • while :; do clear; ls path/to/dir | wc -l; sleep 1; done

    minademian · 2018-12-13 17:48:24 1

  • Requires installing yq (pip install yq)

    rvorlicek · 2018-12-13 08:16:59 0

  • for file in $(egrep 'abc|def' *.sql | cut -d":" -f1 | uniq); do sed -i '/abc/d' ./$file ; sed -i '/def/d' ./$file; done

    guillaume1306 · 2018-12-10 16:23:20 1

  • This coloured prompt will show: username in green, grey "@" sign, hostname in red, current directory in yellow, typed commands in green.

    export PS1="\e[1;32m\u\e[0m@\e[1;31m\h\e[0m\e[1;33m\w:#> \e[1;32m"

    guillaume1306 · 2018-12-10 14:08:06 0

  • parallel cwebp -q 80 {} -o {.}.webp ::: *.png

    kostis · 2018-12-07 23:37:24 0

  •  1 2 3 >  Last ›