du -sh /etc
查總共己用多少
du -h --max-depth=1 /home
各子目錄共用多少
cp -i
會詢問
cp -p 保留屬性
ls -R 看整個子目錄
mkdir -p aaa/bbb/ccc 建整個目錄
rm -r aaa 刪整個目錄
touch file{1,1a,1b,2,2a} myfile 大量建檔案
echo file[^a] 排除法
echo file[a-z] 限定範圍
echo *a 找檔案尾為a
find . -name cat 找檔案為cat
find . -name cat -type f 找檔案
find . -name cat -type d 找目錄
find /etc -size +1k 找大於1k
Lab:locate,whereis,which
#cd /home/max
#yast -i findutils-locate <安裝 locate 相關套件>
#touch whatis
#locate whatis <找不到 whatis 因為剛建立沒有在 DB 內>
#updatedb <更新 DB>
#locate whatis
#whereis whatis
#which whatis
沒有留言:
張貼留言