linuxの下でフォルダのユーザー権限と所属グループを変更し、ファイルにソフト接続を確立します.
3332 ワード
chown wlq testfile//フォルダtestfile所有者をwlqに変更
chgrp[-R]wlq testfile//フォルダtestfile所有者グループをwlqに変更
sudo du-sh/home/*//1台のマシン上の各ユーザーの占有スペースの状況を表示する
sudo userdel-r username//ユーザーの削除
ln-s[ソースファイルまたはディレクトリ][ターゲットファイルまたはディレクトリ]#ソフトリンクの確立
rm-rfソフト接続の名前//ソフト接続の削除
scpは、1台のlinuxサーバから別のlinuxサーバにデータをコピーします(1)ファイルをコピーします:コマンドフォーマット: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(2)レプリケーションディレクトリ:コマンドフォーマット:scp-r local_folder remote_username@remote_ip:remote_folderまたはscp-r local_folder remote_ip:remote_folderは、例えばサーバAからサーバBにファイルをコピーする(IP=0.9.2.18)
Xshellクライアントサーバを終了するプログラムが常に停止する問題解決方法については、nohubコマンド(no hang up)nohup command>myoutを使用します.file 2>&1&ログ出力はファイルmyoutにリダイレクトされた.fileファイルにあります.プロセスを守る目的を果たす.
現在のフォルダzip-r./を圧縮xahot.zip ./* -rは再帰zip[パラメータ][パッケージファイル名][パッケージディレクトリパス]unzip xahotを解凍することを表す.zipはreferenceを説明しません.https://blog.csdn.net/zzllabcd/article/details/49475351 reference:https://blog.csdn.net/mm_bit/article/details/50401869
1.現在のディレクトリの下でpyファイルの数を統計します:find.-name".py"|wc-l 2.現在のディレクトリの下で、すべてのpyファイルの行数を統計する:find.-name".py"|xargs cat|wc-l 3.現在のディレクトリのpyファイルの行数を統計し、空の行をフィルタします:find.-name “*.py” |xargs cat|grep -v ^$|wc -l
userdel linuxso注意:ユーザーlinuxsoを削除しますが、ホームディレクトリとファイルは削除しません.userdel-r linuxso注:ユーザーlinuxsoを削除し、そのホームディレクトリとファイルを一括削除します.adduser xxxフォルダの所有者を変更
NVIDIAグラフィックスドライバを更新するには(0)サーバを再起動する
(1)先にアンインストールするビデオドライバ
(2)駆動runファイルに実行権限を与える
(3)取付駆動(注意パラメータ)
あるディレクトリに対してメンバーに読み書き権限を設定する
統計ファイルの行数
フォルダの下のすべてのファイルのcode行数を統計します.
linuxサーバCUDAバージョンコマンドの表示
linuxサーバCUDNNバージョンコマンドの表示
ファイルの重複行を削除するコマンド
linuxでライブラリをアップグレードするコマンド
シャットダウンと再起動コマンド
2つのファイルの違いを表示
Linuxの下でshellスクリプトにショートカット起動method 1を設定する:profileファイルを変更する
method 2:修正.bashrc
chgrp[-R]wlq testfile//フォルダtestfile所有者グループをwlqに変更
sudo du-sh/home/*//1台のマシン上の各ユーザーの占有スペースの状況を表示する
sudo userdel-r username//ユーザーの削除
ln-s[ソースファイルまたはディレクトリ][ターゲットファイルまたはディレクトリ]#ソフトリンクの確立
rm-rfソフト接続の名前//ソフト接続の削除
scpは、1台のlinuxサーバから別のlinuxサーバにデータをコピーします(1)ファイルをコピーします:コマンドフォーマット: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(2)レプリケーションディレクトリ:コマンドフォーマット:scp-r local_folder remote_username@remote_ip:remote_folderまたはscp-r local_folder remote_ip:remote_folderは、例えばサーバAからサーバBにファイルをコピーする(IP=0.9.2.18)
scp -r folder [email protected]:/home/zhangshan/
Xshellクライアントサーバを終了するプログラムが常に停止する問題解決方法については、nohubコマンド(no hang up)nohup command>myoutを使用します.file 2>&1&ログ出力はファイルmyoutにリダイレクトされた.fileファイルにあります.プロセスを守る目的を果たす.
現在のフォルダzip-r./を圧縮xahot.zip ./* -rは再帰zip[パラメータ][パッケージファイル名][パッケージディレクトリパス]unzip xahotを解凍することを表す.zipはreferenceを説明しません.https://blog.csdn.net/zzllabcd/article/details/49475351 reference:https://blog.csdn.net/mm_bit/article/details/50401869
1.現在のディレクトリの下でpyファイルの数を統計します:find.-name".py"|wc-l 2.現在のディレクトリの下で、すべてのpyファイルの行数を統計する:find.-name".py"|xargs cat|wc-l 3.現在のディレクトリのpyファイルの行数を統計し、空の行をフィルタします:find.-name “*.py” |xargs cat|grep -v ^$|wc -l
userdel linuxso注意:ユーザーlinuxsoを削除しますが、ホームディレクトリとファイルは削除しません.userdel-r linuxso注:ユーザーlinuxsoを削除し、そのホームディレクトリとファイルを一括削除します.adduser xxxフォルダの所有者を変更
chown -R
NVIDIAグラフィックスドライバを更新するには(0)サーバを再起動する
sudo reboot
(1)先にアンインストールするビデオドライバ
nvidia-installer --uninstall
(2)駆動runファイルに実行権限を与える
sudo chmod a+x NVIDIA-Linux-x86_64-410.93.run
(3)取付駆動(注意パラメータ)
sudo ./NVIDIA-Linux-x86_64-375.20.run –no-opengl-files
–no-opengl-files , OpenGL 。
–no-x-check X
–no-nouveau-check nouveau
。
あるディレクトリに対してメンバーに読み書き権限を設定する
# chmod -R 0760 /usr/local
# ls -l /usr/local/ #check new permissions
統計ファイルの行数
find . -name "*.html" | wc -l
wc -l xxx
フォルダの下のすべてのファイルのcode行数を統計します.
wc -l `find -name *.py`
linuxサーバCUDAバージョンコマンドの表示
cat /usr/local/cuda/version.txt
linuxサーバCUDNNバージョンコマンドの表示
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
ファイルの重複行を削除するコマンド
awk ' !x[$0]++' data.txt > result.txt
linuxでライブラリをアップグレードするコマンド
pip install
pip install --upgrade
conda install
conda update
conda update --all
conda
conda update conda
anaconda
conda update anaconda
シャットダウンと再起動コマンド
shutdown -h now (root)
halt
poweroff
shutdown -h 10 (10 )
reboot
shutdown -r now
shutdown -r 10 (10 )
2つのファイルの違いを表示
sort a.txt b.txt | uniq -d
Linuxの下でshellスクリプトにショートカット起動method 1を設定する:profileファイルを変更する
vim /etc/profile
export PATH=/usr/local/intellij/bin:$PATH
source /etc/profile
method 2:修正.bashrc
vim ~/.bashrc
, 。