macutilities

Create a List of Folder Contents (Mac and Terminal)

Want to create a list of files contained within a folder? It’s pretty easy to do on your Mac with Terminal. Simply navigate to the desired folder with Terminal, then enter one of the following commands:

  • Recursive (all sub-folders): ls -la * >> somefile.txt
  • Non-recursive (no sub-folders): ls -la >> somefile.txt

That’s it! Terminal will automatically place a text file of all the files inside the folder. This came in really hand last week when I wanted to show a list of files without making people sit in front of my computer. Create the list, print, done!