📌  相关文章
📜  bash 如何打印目录中的文件列表 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:20.045000             🧑  作者: Mango

代码示例1
# Basic syntax:
ls /path/to/directory/

# Example usage 1:
ls /path/to/directory/ > output_file.txt # Write the files to an output
# Example usage 2:
ls /path/to/directory/ | grep *.txt > output_file.txt # Write the subset
# of files that match the grep search (e.g. end in .txt)