-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.yaml
106 lines (106 loc) · 3.89 KB
/
index.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
- command: adduser [username]
desc: Add a new user to the system
tags: [user, linux, macos, sudo]
- command: adduser [username] sudo
desc: Add a new user to the system and grant sudo privileges
tags: [user, linux, macos, sudo]
- command: adduser [username] --disabled-password
desc: Add a new user to the system without a password
tags: [user, linux, macos, sudo]
- command: deluser [username]
desc: Delete a user from the system
tags: [user, linux, macos, sudo]
- command: deluser --remove-home [username]
desc: Delete a user from the system and remove their home directory
tags: [user, linux, macos, sudo]
- command: grep -rnw [search_pattern] -e [text]
desc: Search for a text string in a directory
tags: [search, linux, macos]
- command: ls -l
desc: List files in a directory
tags: [dir, linux, macos]
- command: ls -l | grep [search_pattern]
desc: List files in a directory and filter by search pattern
tags: [dir, linux, macos]
- command: cd [directory]
desc: Change directory
tags: [dir, linux, macos]
- command: cd ..
desc: Change directory to parent directory
tags: [dir, linux, macos]
- command: cd ~
desc: Change directory to home directory
tags: [dir, linux, macos]
- command: rm [filename]
desc: Remove a file
tags: [dir, linux, macos]
- command: rm -rf [directory]
desc: Force remove a directory and all of its contents
tags: [dir, linux, macos]
- command: touch [filename]
desc: Create a new empty file
tags: [dir, linux, macos]
- command: mkdir [directory]
desc: Create a new directory
tags: [dir, linux, macos]
- command: wc -l [filename]
desc: Count the number of lines in a file
tags: [file, linux, macos]
- command: wc -w [filename]
desc: Count the number of words in a file
tags: [file, linux, macos]
- command: rsync -av --progress sourcefolder destinationfolder --exclude thefoldertoexclude
desc: Copy a folder to another location, excluding a specific folder
tags: [dir, linux, macos]
- command: locate [query
desc: Find a file or directory by name
tags: [dir, linux, macos]
- command: which [command]
desc: Find the path of an executable
tags: [dir, linux, macos]
- command: whereis [command]
desc: Find the path of an executable
tags: [dir, linux, macos]
- command: ssh -L [port]:localhost:[port] [user]@[host]
desc: Create a tunnel to a remote host
tags: [network, ssh, linux, macos]
- command: tar -czvf [file]
desc: Create a compressed tar archive
tags: [archive, compress, linux, macos]
- command: tar -xzvf [file]
desc: Extract a compressed tar archive
tags: [archive, compress, linux, macos]
- command: tar tvf [file]
desc: List the contents of a tar archive
tags: [archive, compress, linux, macos]
- command: cat [file]
desc: Display the contents of a file
tags: [file, linux, macos]
- command: cat [file] | grep [search_pattern]
desc: Display the contents of a file and filter by search pattern
tags: [file, linux, macos]
- command: uname -a
desc: Display system information
tags: [system, linux, macos]
- command: uptime
desc: Display system uptime
tags: [system, linux, macos]
- command: finger
desc: Display information about users
tags: [system, linux, macos]
- command: hostnamectl set-hostname [hostname]
desc: Set the hostname
tags: [host, hostname, system, linux ]
- command: lsof -i -P -n | grep LISTEN
desc: List all listening ports
tags: [network, sudo, linux, macos]
- command: nohup [command] > [fileName] 2>&1 &!
desc: Keep a command running in the background after you log out
tags: [command, background, linux, macos]
- command: chmod 777 [file]
desc: Change file permissions, give read write and execute permissions to all users
tags: [file, linux, macos]
- command: chmod 755 [file]
desc: Change file permissions, give read write and execute permissions to the owner, read and execute permissions to the group and read and execute permissions to all other users
tags: [file, linux, macos]