开发者

Unix filesystem look up

开发者 https://www.devze.com 2022-12-12 03:03 出处:网络
Ho开发者_开发知识库w to get the list of all the files and folders in the root dir including sub-folders and their files.or this: find /If you want to do it programmatically I\'d recommend readdir() an

Ho开发者_开发知识库w to get the list of all the files and folders in the root dir including sub-folders and their files.


or this: find /


If you want to do it programmatically I'd recommend readdir() and opendir().


Try this (with Ewan's modification):

ls -R /


man find

In all seriousness though,

find / -maxdepth 2

That should show you the root directory, folders in /, and the contents of those folders. If you want the subdirectories of the subdirectories, use -maxdepth 3, and so on.


use find command eg

$ find /path -print

or if you have tree installed

$ tree /path
0

精彩评论

暂无评论...
验证码 换一张
取 消