File tree 6 files changed +111
-0
lines changed
6 files changed +111
-0
lines changed Original file line number Diff line number Diff line change
1
+ # curl
2
+
3
+ - Transfers data from or to a server
4
+ - Supports most protocols including HTTP, FTP, POP
5
+
6
+ ## Head request
7
+
8
+ ` curl --head http://localhost `
9
+
10
+ ## Send form-encoded data
11
+
12
+ ` curl --data name=bob http://localhost/form `
13
+
14
+ ## Send JSON data
15
+
16
+ ` curl -X POST -H "Content-Type: application/json" -d '{"name":"bob"}' http://localhost/login `
17
+
18
+ ## Specify an HTTP method
19
+
20
+ ` curl -X DELETE http://localhost/item/123 `
Original file line number Diff line number Diff line change
1
+ # grep
2
+
3
+ - Matches patterns in input text
4
+ - Supports simple patterns and regular expressions
5
+
6
+ ## Search for an exact string
7
+ ` grep something FILE `
8
+
9
+ ## Use a regex instead of a word
10
+
11
+ ` grep -e ^regex$ FILE `
12
+
13
+ ## See 3 lines of context
14
+
15
+ ` grep -C 3 something FILE `
16
+
17
+ ## Print the count of matches
18
+
19
+ ` grep -c something FILE `
20
+
21
+ ## Use the standard input instead
22
+
23
+ ` cat FILE | grep something `
Original file line number Diff line number Diff line change
1
+ # less
2
+
3
+ - Opens a file for reading
4
+ - Allows movement and search
5
+ - Doesn't read the entire file (suitable for logs)
6
+
7
+ ## Open a file
8
+
9
+ ` less source_file `
10
+
11
+ ## Page up / down
12
+
13
+ ` d (next), D (previous) `
14
+
15
+ ## Start / end of file
16
+
17
+ ` g (start), G (end) `
18
+
19
+ ## Search for a string
20
+
21
+ ` /something then n (next), N (previous) `
22
+
23
+ ## Exit
24
+
25
+ ` q `
Original file line number Diff line number Diff line change
1
+ # ps
2
+
3
+ - Information about running processes
4
+
5
+ ## List all running processes
6
+
7
+ ` ps aux `
Original file line number Diff line number Diff line change
1
+ # scp
2
+
3
+ - Copies files between hosts on a network
4
+ - Works over a secure connection (SSH)
5
+
6
+ ## Uploading a file
7
+
8
+ ` scp local_file 10.0.0.1:/remote/path/filename `
9
+
10
+ ## Uploading a directory
11
+
12
+ ` scp -r local_folder 10.0.0.1:/remote/path/ `
13
+
14
+ ## Downloading a file
15
+
16
+ ` scp 10.0.0.1:/remote/path/filename local_file `
17
+
18
+ ## Specifying credentials
19
+
20
+ ` scp local_file [email protected] :/remote/path `
Original file line number Diff line number Diff line change
1
+ # tar
2
+
3
+ - Archiving utility
4
+ - Supports tar / gzip / bzip
5
+
6
+ ## create an archive from files
7
+
8
+ ` tar cf target.tar file1 file2 file3 `
9
+
10
+ ## create a gzipped archive
11
+
12
+ ` tar cfz target.tar.gz file1 file2 file3 `
13
+
14
+ ## extract an archive in a target folder
15
+
16
+ ` tar xf source.tar -C folder `
You can’t perform that action at this time.
0 commit comments