cheat - полезное приложение для CLI
#1
Результат примерно такой:

Код:
user@desktop ~> cheat wget
# To download <url>:
wget <url>
#
# To download multiples files with multiple URLs:
wget <url>...

# To download <url> and change its name:
wget <url> -O <outfile>

# To download <url> into <dir>:
wget -P <dir> <url>

# To continue an aborted downloaded:
wget -c <url>

# To parse a file that contains a list of URLs to fetch each one:
wget -i url_list.txt

# To mirror a whole page locally:
wget -pk <url>

# To mirror a whole site locally:
wget -mk <url>

# To download files according to a pattern:
wget http://example.com/files-{1..15}.tar.bz2

# To download all the files in a directory with a specific extension if directory indexing is enabled:
wget -r -l1 -A.extension http://example.com/directory

# To download only response headers (-S --spider) and display them on stdout (-O -).:
wget -S --spider -O - <url>

# To change the User-Agent to 'User-Agent: toto':
wget -U 'toto' <url>

Код:
user@desktop ~> cheat curl                                                                                                                             
# To download a file:
curl <url>

# To download and rename a file:
curl <url> -o <outfile>

# To download multiple files:
curl -O <url> -O <url>

# To download all sequentially numbered files (1-24):
curl http://example.com/pic[1-24].jpg

# To download a file and pass HTTP authentication:
curl -u <username>:<password> <url>

# To download a file with a proxy:
curl -x <proxy-host>:<port> <url>

# To download a file over FTP:
curl -u <username>:<password> -O ftp://example.com/pub/file.zip

# To get an FTP directory listing:
curl ftp://username:password@example.com

# To resume a previously failed download:
curl -C - -o <partial-file> <url>

# To fetch only the HTTP headers from a response:
curl -I <url>

# To fetch your external IP and network info as JSON:
curl http://ifconfig.me/all.json

# To limit the rate of a download:
curl --limit-rate 1000B -O <outfile>

# To get your global IP:
curl httpbin.org/ip

# To get only the HTTP status code:
curl -o /dev/null -w '%{http_code}\n' -s -I URL

Код:
user@desktop ~> cheat ssh
# To ssh via pem file (which normally needs 0600 permissions):
ssh -i <pemfile> <user>@<host>                                                                                                                           

# To connect on a non-standard port:
ssh -p <port> <user>@<host>                                                                                                                               

# To connect and forward the authentication agent:
ssh -A <user>@<host>

# To execute a command on a remote server:
ssh -t <user>@<host> 'the-remote-command'

# To tunnel an x session over SSH:
ssh -X <user>@<host>

# Redirect traffic with a tunnel between local host (port 8080) and a remote
# host (remote.example.com:5000) through a proxy (personal.server.com):
ssh -f -L 8080:remote.example.com:5000 user@personal.server.com -N

# To launch a specific x application over SSH:
ssh -X -t <user>@<host> 'chromium-browser'

# To create a SOCKS proxy on localhost and <port>:
ssh -qND <port> <user>@<host>

# To tunnel an ssh session over the SOCKS proxy on localhost and port 9999:
ssh -o "ProxyCommand nc -x 127.0.0.1:9999 -X 4 %h %p" <user>@<host>

# -X use an xsession, -C compress data, "-c blowfish" use the encryption blowfish:
ssh <user>@<host> -C -c blowfish -X

# For more information, see:
# http://unix.stackexchange.com/q/12755/44856

# To copy files and folders through ssh from remote host to pwd with tar.gz
# compression when there is no rsync command available:
ssh <user>@<host> "cd /var/www/Shared/; tar zcf - asset1 asset2" | tar zxf -

# To mount folder/filesystem through SSH
# Install SSHFS from https://github.com/libfuse/sshfs
# Will allow you to mount a folder securely over a network.
sshfs <user>@<host>:/path/to/folder /path/to/mount/point

# Emacs can read file through SSH
# Doc: http://www.gnu.org/software/emacs/manual/html_node/emacs/Remote-Files.html
emacs /ssh:<user>@<host>:<file>

Есть для линуксов и в портах FreeBSD. Насчёт других *BSD не знаю.

https://github.com/cheat/cheat
It's time to kick gum and chew ass. And i'm all out of ass.
Ответ


Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)