-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnote_misc.txt
43 lines (35 loc) · 1.41 KB
/
note_misc.txt
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
utility
#download
-wget
wget [address] #Downloading/saving
wget -O user_test1.sh https://raw.githubusercontent.com/krimsoda/Linux/main/sc_user_add.sh #Downloading and renaming files
-curl
curl [address] #contents display
curl -O [address] #Downloading/saving
curl -o user_test1.sh https://raw.githubusercontent.com/krimsoda/Linux/main/sc_user_add.sh #Downloading and renaming files
curl -K {file.txt}
## file.txt ##
-O
url = "https://raw.githubusercontent.com/krimsoda/Linux/main/note_misc.txt"
-O
url = "https://raw.githubusercontent.com/krimsoda/Linux/main/note_network.txt"
-scp
scp file.txt [email protected]:/remote/directory #Copy a Local File to a Remote System
scp [email protected]:/remote/file.txt /local/directory #Copy a Remote File to a Local System
-rsync
rsync -r dir1/ dir2 #copy local system
rsync -a ~/dir1 username@remote_host:destination_directory #Using Rsync to Sync with a Remote System (push)
rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine #Using Rsync to Sync with a Remote System (pull)
-git
git clone [git address]
git pull
History
set +o history # temporarily turn off history
# commands here won't be saved
set -o history # turn it back on
history -d [line] #delete a single command number
Check Ports via lsof
lsof -nP -iTCP -sTCP:LISTEN
lsof -nP -i:[port-number]
lsof -nP -iUDP:53
nmap -n -PN -sT -sU -p- localhost #Scan TCP and UDP ports