跳轉到內容

Linux 指南/檔案操作

來自華夏公益教科書
前一個 上一個 下一個

ls
列出當前目錄中的所有檔案和目錄。
mv <file> <to>
將 <file> 移動到目標 <to>。
rm <file>
刪除 <file>。
cd <dir>
將當前目錄更改為 <dir>。
cat <file>
連線檔案並在標準輸出上顯示它們,文字檔案最適合:)
find [path...] [expression]
在給定路徑中搜索檔案
xargs <command>
從 stdin 獲取輸入並將其格式化為另一個程式的引數。例如,要刪除所有以 ~ 結尾的檔案,請寫入 find . -name "*~" | xargs rm

從遠端系統複製檔案 (rsync)

[編輯 | 編輯原始碼]
rsync -ave ssh <remote_server>:<syntaxhighlight_path> <dest_dir>

示例

rsync -ave ssh root@192.168.1.252:/tmp/myfile .
華夏公益教科書