简体   繁体   English

使用带有选项和文件夹的“ ls”并获取完整路径

[英]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.

相关问题 使用 ls 命令在 Linux 中使用完整路径列出文件 - List file using ls command in Linux with full path ls | grep -c和完整路径? - ls | grep -c and full path? 对特定的路径和文件类型使用LS,而无需重新获得完整的文件路径? - Using LS for a specific path & file type without returing full file path? 如何在linux中使用ls和-R选项结合grep显示文件的完整路径 - How to display full path of file using ls in linux with -R option in conjunction with grep 当存在完整路径时,如何使用补丁在不同文件夹上为文件夹应用差异文件? - How to apply a diff file for a folder, using patch, on a different folder when full path is present? Shell脚本使用ls递归打印完整目录树 - Shell script to recursively print full directory tree using ls 在 linux 中,如何获取我正在使用的命令的完整路径? - In linux, how to get the full path of a command I am using? 仅当Linux bash中存在子文件夹时,才使用文件名获取当前目录(不是完整路径) - Get current directory (not full path) with filename only when sub folder is present in Linux bash 如何zip文件夹没有完整路径 - How to zip folder without full path 如何使用`ls`列出linux shell中的文件,因为它们列在相应的文件夹中 - How to list files in linux shell using `ls` as they are listed in the corresponding folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM