Linuxコマンド一覧

1.あるポートの応用を殺す
port=9996
netstat -anp | grep $port | head -1 | awk ‘{print $7}’| awk ‘BEGIN{FS=”/”} {print $1}’ | xargs kill -9

2.Linuxの間にファイルを転送する
secure copy
scp [選択可のパラメータ] file_source file_target
scp local_file remote_username@remote_ip:remote_folder
scp local_file remote_username@remote_ip:remote_file
scp local_file remote_ip:remote_folder
scp local_file remote_ip:remote_file
scp -r local_folder remote_username@remote_ip:remote_folder
scp -r local_folder remote_ip:remote_folder

Comments are closed.