cheatsheet

redirect

show stdout but redirect all to file

[!NOTE|label:references:]

tips:

  • echo to stderr

  • stderr output with filter

  • or

get output with color code from stderr

time & date

[!TIP|label:see also:]

show cal

synchronize date and time with over ssh

[!NOTE|label:inspired from:]

  • verify

download and extract

[!NOTE|label:references:]

  • *.gz

  • *.zip

  • *.tar.gz

check file without extract

extract jar

  • Delete files from JAR without unzip

[!TIP] references:

params shortcuts :

SHORT PARAMS
LONG PARAMS

-r

--recursive

-m

--mirror

-l

--level

-k

--convert-links

-K

--backup-converted

-P

--directory-prefix

-nv

--no-verbose

-nc

--no-clobber

-nd

--no-directories

-nH

--no-host-directories

-np

--no-parent

-x

--force-directories

-b

--background

-v

--verbose

-p

--page-requisites

  • mirror whole website

download directly

  • with level

  • with credentials

    • .wgetrc

    • from cmd

    • ignore credentials

  • converting links for local viewing

  • switching off robot exclusion

compress

zip package with dot-file

remove dot-file without skipping '..' '.' issue

[!NOTE|label:references:]

show 256 colors

[!TIP] see also:

commands

ls

[!TIP|label:references]

PWD's secrets

list the command startsWith

fuzzy find for commands

batch commands

batch rename

xargs rename

batch move

[!NOTE]-I replace-str

batch copy

reference:

copy single file to multipule folders

ldapsearch

[!NOTE] enhaanced script

search specific user

[!NOTE] info :

  • ldap url : ldaps://ldap.mydomain.com:636

  • base search base : dc=mydomain,dc=com

  • login user : user1 / user1password

  • search : user2

remove #refldaps://..

  • remove #.*

  • remove empty lines

  • remove all

  • or insert password via interactive mode ( -W )

filter DN field only

filter SAMAccountName, uid and uidNumber only

[!TIP] filter base on base DN (OU=Person,DC=mydomain,DC=com)

filter particular group

  • search particular group (cn=DL-name-group)

get userCertificates

[!NOTE|label:references:]

  • get cert info

  • save local

    • der

    • crt

others

directory diff

show some command periodically

  • watch with pipe

clear

use less as tail -f

netcat & nmap-ncat

[!NOTE] references:

  • install

  • switch with nmap & netcat

  • check

  • check package

alternatives & update-alternatives

  • install

  • modify

polar clock

take screenshots of websites from terminal

[!NOTE|label:references:]

  • firefox

Last updated

Was this helpful?