linux - How to extract name of all files contained in a folder into a .txt file? -


i want extract name of files contained in folder .txt file ex: when type ls command in terminal shows list files , folder names. can store these names in .txt file.

you can redirect output of ls command file > so:

ls > files.txt

note overwrite previous contents of files.txt. append, use >> instead so:

ls >> files.txt


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -