mirror of
https://github.com/cheat/cheat.git
synced 2025-12-13 02:32:05 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6137cac8b | ||
|
|
711fd02195 | ||
|
|
248f5a0526 | ||
|
|
8e7ce511bd | ||
|
|
ba7ebc8392 | ||
|
|
6670785a2a | ||
|
|
aabaab1185 | ||
|
|
22eb1f2df4 | ||
|
|
a519ea163e | ||
|
|
6a2eda80d4 | ||
|
|
20d52376f9 | ||
|
|
3b2848668a | ||
|
|
a8f91d4224 | ||
|
|
e0adbbc5b9 | ||
|
|
4d57f529c9 | ||
|
|
5caa8fed38 | ||
|
|
69f91e0cf4 | ||
|
|
fdbc8909cc | ||
|
|
76a91ce358 |
@@ -38,7 +38,7 @@ from docopt import docopt
|
||||
|
||||
if __name__ == '__main__':
|
||||
# parse the command-line options
|
||||
options = docopt(__doc__, version='cheat 2.1.16')
|
||||
options = docopt(__doc__, version='cheat 2.1.19')
|
||||
|
||||
# list directories
|
||||
if options['--directories']:
|
||||
|
||||
23
cheat/cheatsheets/apt
Normal file
23
cheat/cheatsheets/apt
Normal file
@@ -0,0 +1,23 @@
|
||||
# To search a package:
|
||||
apt search package
|
||||
|
||||
# To show package informations:
|
||||
apt show package
|
||||
|
||||
# To fetch package list:
|
||||
apt update
|
||||
|
||||
# To download and install updates without installing new package:
|
||||
apt upgrade
|
||||
|
||||
# To download and install the updates AND install new necessary packages:
|
||||
apt dist-upgrade
|
||||
|
||||
# Full command:
|
||||
apt update && apt dist-upgrade
|
||||
|
||||
# To install a new package(s):
|
||||
apt install package(s)
|
||||
|
||||
# To uninstall package(s)
|
||||
apt remove package(s)
|
||||
@@ -19,6 +19,9 @@ docker inspect --format {{.State.Pid}} <container_name_or_ID>
|
||||
# http://nathanleclaire.com/blog/2014/07/12/10-docker-tips-and-tricks-that-will-make-you-sing-a-whale-song-of-joy/
|
||||
docker inspect --format='{{json .Volumes}}' <container_id> | python -mjson.tool
|
||||
|
||||
# Copy files/folders between a container and your host
|
||||
docker cp foo.txt mycontainer:/foo.txt
|
||||
|
||||
# list currently running containers
|
||||
docker ps
|
||||
|
||||
@@ -26,4 +29,4 @@ docker ps
|
||||
docker ps -a
|
||||
|
||||
# list all images
|
||||
docker images
|
||||
docker images
|
||||
|
||||
@@ -3,3 +3,6 @@ ping -c 15 www.example.com
|
||||
|
||||
# ping a host with a total count of 15 packets overall, one every .5 seconds (faster ping).
|
||||
ping -c 15 -i .5 www.example.com
|
||||
|
||||
# test if a packet size of 1500 bytes is supported (to check the MTU for example)
|
||||
ping -s 1500 -c 10 -M do www.example.com
|
||||
|
||||
Reference in New Issue
Block a user