network related commands


Author: yifei / Created: May 31, 2017, 2:54 p.m. / Modified: May 31, 2017, 3:08 p.m. / Edit

fuser

view which program is using which port.

fuser XXX/tcp  # see which program is using tcp port XXX
fuser XXX/upd  # see which program is using udp port XXX
fuser -k XXX/tcp  # kill the program, if you have right permissions

curl

cookies

curl -v --cookie "USER_TOKEN=Yes" http://127.0.0.1:5000/

使用 rsync 同步

rsync -azP local_dir remote_dir

默认情况下,rsync 使用增量同步,而不会删除文件。使用 --delete 删除文件


评论区