[英]using 'ls' with options and folder and get full path
i'm using ls myfolder
我正在使用
ls myfolder
and I've seen ls -lrt -d -1 $PWD/*
which lists files with full path 并且我已经看到
ls -lrt -d -1 $PWD/*
列出了具有完整路径的文件
the question is how do i list files with full path in a folder? 问题是如何列出文件夹中具有完整路径的文件? (without using
cd
to go inside that folder) (不使用
cd
进入该文件夹)
您可以使用find
:
find PATH_TO_FOLDER -maxdepth 1 -type f -printf "%p\n"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.