Skip to content

Commit fc21f2e

Browse files
committed
add rsync, nettop and iotop
1 parent 4356244 commit fc21f2e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

useful-unix-stuff.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ sudo ln -s /usr/local/bin/npm /usr/bin/npm
5656
# SSH copy from remote host to local (<example> is the Host in ~/.ssh/config)
5757
scp example:/some/path/on/remove/server/file.ext localfile.ext
5858

59+
# rsync from local to remote host, excluding mac files (<example> is the Host in ~/.ssh/config)
60+
rsync -rave "ssh -i /Users/$USER/.ssh/example.pem" --exclude ".DS_Store" -r . example:~/some-directory-here
61+
5962
# Last 100 most used commands
6063
history | sed "s/^[0-9 ]*//" | sed "s/ *| */\n/g" | awk '{print $1}' | sort | uniq -c | sort -rn | head -n 100
6164

@@ -143,5 +146,11 @@ cat /etc/resolv.conf
143146
8.8.8.8
144147
8.8.4.4
145148

149+
# Like top, but for networking (built in Mac OS)
150+
nettop
151+
152+
# Like top, but for disk I/O
153+
iotop
154+
146155
# Convert PNG image sequence (image-000.png) to H.264 using ffmpeg
147156
ffmpeg -i ./image-%03d.png -f mp4 -vcodec libx264 -pix_fmt yuv420p <filename>.mp4

0 commit comments

Comments
 (0)