Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I export a recursive directory & file listing to a text file in Linux Bash shell with an SSH command?

Assume I'm in my pwd - /home/kparisi/

What command can I run to export all directories & files from this directory and all subdirectories within it to a text file?

I don't need the contents of the files, just their names & paths (and permissions if possible)

Thanks in advance.

like image 776
CheeseConQueso Avatar asked Dec 14 '22 22:12

CheeseConQueso


1 Answers

Use find to get a listing of all the files in a directory and its subdirectories, then pipe it to a file with the > operand.

find > list.txt
like image 191
Othi Avatar answered Dec 21 '22 16:12

Othi