Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 6, 2006, 09:45 PM   #1
Judo
macrumors regular
 
Join Date: Mar 2002
Location: New Zealand
Print a list of the whole file directory

I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX.
It would be good to be able to omit some folders from this list as well.

I've had a look around but have not been able to find anything to help me.
Any ideas anyone?
Judo is offline   0 Reply With Quote
Old Sep 6, 2006, 10:50 PM   #2
Cameront9
macrumors 6502a
 
Join Date: Aug 2006
Quote:
Originally Posted by Judo
I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX.
It would be good to be able to omit some folders from this list as well.

I've had a look around but have not been able to find anything to help me.
Any ideas anyone?
I'm no UNIX expert, but I'm fairly certain you can do this easily via the terminal. Study up on some terminal commands.

And just out of curiosity: why, if you don't mind me asking? A list of every file would be HUGE.
Cameront9 is offline   0 Reply With Quote
Old Sep 6, 2006, 11:28 PM   #3
FFTT
macrumors 68030
 
FFTT's Avatar
 
Join Date: Apr 2004
Location: A Stoned Throw From Ground Zero
When you click on your HD icon from your desktop, depending on how you
have your view preferences set, you'll either see folders or a list or column view

Click the middle VIEW button and you'll get a list of all your main folders and sub folders.

Is this what you were trying to print to pdf?

Please be careful and don't just go moving files around if you don't know where they belong.
__________________
Don't look at me in that tone of voice!
FFTT is offline   0 Reply With Quote
Old Sep 6, 2006, 11:32 PM   #4
7on
macrumors 601
 
7on's Avatar
 
Join Date: Nov 2003
Location: Punk Hazard
OS9 had this... I don't believe it made its way to OSX yet.
__________________
jonshipman.com
7on is offline   0 Reply With Quote
Old Sep 7, 2006, 12:27 AM   #5
Judo
Thread Starter
macrumors regular
 
Join Date: Mar 2002
Location: New Zealand
Quote:
Originally Posted by Cameront9
I'm no UNIX expert, but I'm fairly certain you can do this easily via the terminal. Study up on some terminal commands.

And just out of curiosity: why, if you don't mind me asking? A list of every file would be HUGE.

Yeah, I thought there might be a unix command for this, I'll have to look it up, unless there are any experts out there who can help me out.

A client is asking for this. She has asked for a list of all files on her computer. And I'm not exactly sure why she wants it, but she's the one paying.
Judo is offline   0 Reply With Quote
Old Sep 7, 2006, 12:30 AM   #6
Judo
Thread Starter
macrumors regular
 
Join Date: Mar 2002
Location: New Zealand
Quote:
Originally Posted by FFTT
When you click on your HD icon from your desktop, depending on how you
have your view preferences set, you'll either see folders or a list or column view

Click the middle VIEW button and you'll get a list of all your main folders and sub folders.

Is this what you were trying to print to pdf?

Please be careful and don't just go moving files around if you don't know where they belong.

Not quite what I want, I need a list of all of the files on her computer. I'm a Apple techie, so I know what not to move, and I should probably know how to do this but I dont.

Thanks for the help so far guys, you're awesome. :hugsmilie:
Judo is offline   0 Reply With Quote
Old Sep 7, 2006, 12:33 AM   #7
WildCowboy
Administrator/Editor
 
WildCowboy's Avatar
 
Join Date: Jan 2005
She does realize that this list could easily be 50,000+ files long, right?
__________________
Editor in Chief, MacRumors
WildCowboy is offline   0 Reply With Quote
Old Sep 7, 2006, 12:44 AM   #8
dukebound85
macrumors P6
 
dukebound85's Avatar
 
Join Date: Jul 2005
Location: 5045 feet above sea level
try typing

ls /*

I am not sure if this will get all of the folders within folders though just all of the directories and the files in the root directory

anyone figure this out?

to save it as a file just do this though

ls /* > filename ~ the tilde is the directory you want to save the file in


hope this helps somewhat or at least provides a starting point
dukebound85 is offline   0 Reply With Quote
Old Sep 7, 2006, 12:51 AM   #9
WildCowboy
Administrator/Editor
 
WildCowboy's Avatar
 
Join Date: Jan 2005
Okay...here we go. Download WhatSize. Let it scan the entire hard drive. Hit Command-3 to see everything in Table View. (BTW, my tiny 500 MHz iBook with 4 GB of stuff on has 85000 files and 20000 folders.) Click somewhere on the table to make sure it has focus, then print to PDF. I tried it with a small sample of files...about 25 of them (used the "files over 100 MB" filter to limit things)...and it seemed to work.

I don't know how happy her computer will be about trying to produce a 2000+ page PDF though...
__________________
Editor in Chief, MacRumors
WildCowboy is offline   0 Reply With Quote
Old Sep 7, 2006, 11:31 AM   #10
CyberB0b
macrumors regular
 
Join Date: Apr 2004
in the terminal type

find /

will list everything

find / -type f

will list just files. change f to a d to find just directories.

find / -type f > allfiles.txt

will save it in a text file called allfiles.txt

man find

will tell you more about the find command
CyberB0b is offline   0 Reply With Quote
Old Sep 7, 2006, 06:33 PM   #11
Judo
Thread Starter
macrumors regular
 
Join Date: Mar 2002
Location: New Zealand
Quote:
Originally Posted by WildCowboy
Okay...here we go. Download WhatSize. Let it scan the entire hard drive. Hit Command-3 to see everything in Table View. (BTW, my tiny 500 MHz iBook with 4 GB of stuff on has 85000 files and 20000 folders.) Click somewhere on the table to make sure it has focus, then print to PDF. I tried it with a small sample of files...about 25 of them (used the "files over 100 MB" filter to limit things)...and it seemed to work.

I don't know how happy her computer will be about trying to produce a 2000+ page PDF though...
Woo, just tried this and it's up to 2100 pages. I don't think she could use that.
I might have to find a way to exclude the system and library folders, and I think the terminal maybe the only way to do this.

edit: just over 3600 pages
Judo is offline   0 Reply With Quote
Old Sep 7, 2006, 06:39 PM   #12
Judo
Thread Starter
macrumors regular
 
Join Date: Mar 2002
Location: New Zealand
Thanks Dukebound and Cyberbob. Looks like that's gonna work fine.

Judo is offline   0 Reply With Quote
Old Aug 17, 2010, 03:00 AM   #13
MacLustre
macrumors newbie
 
Join Date: Feb 2010
There's no utility like the Windows OS's "Folder Printer" for the Mac?
MacLustre is offline   0 Reply With Quote
Old Aug 18, 2010, 11:12 PM   #14
UpQuark
macrumors member
 
Join Date: Jan 2002
Location: Zushi, Japan
Send a message via AIM to UpQuark
Quote:
Originally Posted by MacLustre View Post
There's no utility like the Windows OS's "Folder Printer" for the Mac?
Not directly.. but you can use the UNIX commands or automator. The question here is why..? But each to their own..
UpQuark is offline   0 Reply With Quote
Old Aug 19, 2010, 11:22 AM   #15
Relentlos
macrumors member
 
Join Date: Aug 2010
Send a message via AIM to Relentlos
I'm not sure why one would want a list of ALL files, but I could see a list of all files in a particular directory, such as movies or something.
__________________
AEBS, 17" iMac, 1GB RAM, OS X 10.4.11, 1TB HDD, iTouch first generation
Relentlos is offline   0 Reply With Quote
Old Sep 28, 2010, 09:11 PM   #16
toasted ICT
macrumors newbie
 
Join Date: Sep 2010
Location: Sydney
Another way

This is a bit of a basic approach but its easy and doesnt need terminal.

What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.

Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.

In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.

In Pages or Text edit, choose edit then "paste and match style"

You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.

Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
toasted ICT is offline   0 Reply With Quote
Old Sep 29, 2010, 02:26 AM   #17
kuwisdelu
macrumors 65816
 
Join Date: Jan 2008
Open Terminal, type the following:

ls -R > everyfile.txt

....this will be long.
__________________
2.0 GHz quad-core i7 15" MacBook Pro 2011
iPad 2 (Black) WiFi+3G 64GB
iPhone 4S (White) 64 GB
kuwisdelu is offline   0 Reply With Quote
Old Jun 13, 2011, 08:20 AM   #18
oldguyfromnj
macrumors newbie
 
Join Date: Jan 2009
Quote:
Originally Posted by toasted ICT View Post
This is a bit of a basic approach but its easy and doesnt need terminal.
What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.
Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.
In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.
In Pages or Text edit, choose edit then "paste and match style"
You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.
Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
OK, but this only copies the file NAMES, not Modification Date or size.

Last edited by oldguyfromnj; Jun 13, 2011 at 08:25 AM.
oldguyfromnj is offline   0 Reply With Quote
Old Sep 10, 2011, 04:55 PM   #19
frank.souders
macrumors newbie
 
Join Date: Sep 2011
Thankful for those who post solutions in MacRumors!

3. Judo's issue(s) was resolved.
2. toasted_ICT's solution worked well for what I was needing.
1. Thanks to all of you who aim to help others on this forum!
frank.souders is offline   0 Reply With Quote
Old Mar 20, 2013, 10:44 AM   #20
briantho
macrumors newbie
 
Join Date: Mar 2013
JUST what I was looking for! Many thanks.

Quote:
Originally Posted by toasted ICT View Post
This is a bit of a basic approach but its easy and doesnt need terminal.

What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.

Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.

In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.

In Pages or Text edit, choose edit then "paste and match style"

You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.

Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
briantho is offline   0 Reply With Quote
Old Mar 23, 2013, 10:09 AM   #21
Fishrrman
macrumors 68040
 
Join Date: Feb 2009
"I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX."

Are you really REALLY sure that you want to do this?

Do you know how many files make up a typical installation of OS X?

We're talking in the neighborhood of 200,000+. You may actually have more than that.

Do you really want to create a pdf with a quarter of a million entries?
Fishrrman is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory xpmrz Mac Basics and Help 0 Dec 31, 2013 02:59 PM
Copy files into sub-directory in list view theEconomist Mac Basics and Help 0 Jul 4, 2013 04:20 AM
getting a list of files from a directory farmerdoug Mac Programming 12 Apr 8, 2013 05:03 PM
-Bash No such file or directory os ck Mac Basics and Help 0 Jan 14, 2013 09:21 AM
How can I print to file (simple output) from the print dialog? Not PDF or PostScript hachiroku OS X 0 Oct 24, 2012 03:48 PM

Forum Jump

All times are GMT -5. The time now is 02:04 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC