把当前目录文件名输出到一个文件

linux

ls > filename.txt
--打印当前目录及子目录所有文件
find "$PWD" > print.txt

window dos

dir > filename.txt
--打印当前目录及子目录所有文件
dir /s /b > print.txt

Refs

How to send list of file in a folder to a txt file in Linux
How to create a text file list of the contents of a folder
How do I print a listing of files in a directory?
List files recursively in Linux CLI with path relative to the current directory

posted @ 2017-04-18 10:41  码不能停  阅读(479)  评论(0编辑  收藏  举报