簡體   English   中英

Busybox SSH命令

[英]Busybox SSH commands

嵌入式Linux上的Busybox,SSH命令。 rm命令僅刪除當前目錄中的文件,還是子目錄中的文件? 這是目錄結構:

<root@sample:/abc/1/demwr> ls -la
total 5
drwxr-xr-x    3 root     0                0 Jan  1 00:00 .
drwxr-xr-x    5 root     0                0 Jan  1 00:05 ..
-rwxrwxrwx    1 root     0              905 Jan  1 00:06 file1.der
drwxr-xr-x    2 root     0                0 Jan  1 00:00 download
lrwxrwxrwx    1 root     0               25 Jan  1 00:00 file2.der -> /abc/zw/kmc/file2.der
lrwxrwxrwx    1 root     0               28 Jan  1 00:00 file3.bin -> /abc/zw/kmc/file3.bin
-rwxrwxrwx    1 root     0             1052 Jan  1 00:06 file4.der
-rwxrwxrwx    1 root     0              140 Jan  1 00:02 file5.bin
lrwxrwxrwx    1 root     0               37 Jan  1 00:00 file6.bin -> /etc/qrstu/demwr/file6.bin

rm僅在對其應用遞歸( -r )時才刪除目錄。 您可以使用--help來檢查busybox rm的版本。 對於我的busybox,它確實具有以下功能:

$ busybox rm --help
BusyBox v1.21.0 (2013-12-08 07:54:36 PHT) multi-call binary.

Usage: rm [-irf] FILE...

Remove (unlink) FILEs

        -i      Always prompt before removing
        -f      Never prompt
        -R,-r   Recurse

添加:在執行rm * ,外殼程序將首先擴展glob模式*並將其傳遞給rm 如果沒有-rrm將僅刪除傳遞給它的文件,並且目錄將保持不變。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM