Recursive listing of subdirectories via FTP
Came across a new, very useful, command line FTP command to list all the subdirectories and files under the current directory. This is very much like the DOS command 'dir /s'
You can use either mls or mdir (Multiple ls or multiple dir) depending on what data you want to see.
mdir gives full file information with filesize, owner, and chmod info.
mls gives only the path/filename info, which is great if you need a cleaner display without all the extraneous data.
To get everything displayed to the screen:
mdir * -
mls * -
To get everything written to a text file:
mdir * localfile.txt
mls * localfile.txt
(You must be logged in to vote)
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml
. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.