![](/img/trans.png)
[英]how to show detailed file information under a directory in Linux Terminal? - C++
[英]how to get information of files under current directory in Linux
我正在Linux中實現FTP服務器。 當用戶發送CWD命令時,我使用chroot commmand更改當前的工作目錄。 但是,我不能再使用“ ls -l”命令來獲取文件列表信息了。 在這種情況下,有什么方法可以獲取文件信息?
chroot
並不意味着要更改當前目錄。 您應該使用chdir
。
( chroot
更改了根文件系統。因此,將chroot
更改為用戶目錄后,很可能在此新的根文件系統中找不到/bin/ls
。)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.