MAC OS X: Forum

Drive Inventory

COW Forums : Apple OS X

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Weiner
Drive Inventory
on Mar 4, 2011 at 9:59:30 pm

Hello. For PC, ElegantPie offers a drive inventory solution: http://www.elegantpie.com/driveinventory-download.html

I'm looking for something like that for Mac. I'm getting to the point where I have a lot of harddrives and I want to create a searchable list when the drives are offline, for both media and other files. Has anyone come across anything that will do that?

Thanks,
Mike


Return to posts index

Chris Gordon
Re: Drive Inventory
on Mar 5, 2011 at 2:29:10 am

You can easily dump a listing of all of the files on a disk (or in a specific directory) with find. Something like the following will list all of the files in the current directory (and its children).

find . -type f -name "*" -exec ls -al {} \;

You could then redirect this to a file and import into Excel (seems that's a point of the referenced software) or just sort through the text file (grep, awk and sort are your friends). Of course this is very much the "unix way" and requires comfort at the command line.

Hope that helps.


Return to posts index

Mike Weiner
Re: Drive Inventory
on Mar 7, 2011 at 7:18:38 pm

yeah i have only entered one line on the command end, but will experiment with it as i learn things very quickly.

how would i go from your line above to exporting the information to a text file or to excel (for example). if it could go to excel, that is just as well.

thanks,
mike


Return to posts index


Chris Gordon
Re: Drive Inventory
on Mar 8, 2011 at 12:11:15 am

The following will dump the output to a csv file that can easily be pulled into excel. Specifically it's dumping the following fields:
file owner, file size, date, filename (with full path)

find . -type f -name "*" -exec ls -al {} \; | awk ' {print $3", "$5", "$6, $7, $8", "$9 }' > file.csv

So what is this really doing? I'm calling the "find" command to list all of the files in the current directory and lower then handing that to ls to print out the details on the file. This is then piped to awk to print out the specific fields I care about. Finally the output of awk is directed to a file named file.csv.

One of the great(est) powers of OS X is its UNIX underpinnings. It is very common in UNIX to take a number of different commands and string them together like this giving you a lot of power very quickly and easily. Learning the command line and more about UNIX can be a bit daunting, but once you do, you can unlock a whole new world of power and flexibility.


Return to posts index

Mike Weiner
Re: Drive Inventory
on Mar 8, 2011 at 3:27:28 pm

Ok. So say I have a few harddrives hooked into my computer, and I only want to create a csv for one of them not all of them, how do i go about that? I assume in terminal my command lines should look like:

find . -type f -name "*" -exec ls -al {} \; find . -type f -name "*" -exec ls -al {} \; | awk ' {print $3", "$5", "$6, $7, $8", "$9 }' > file.csv

Thanks!


Return to posts index

Jerry Jorgenson
Re: Drive Inventory
on Mar 9, 2011 at 1:47:08 pm

cd /drive mount point that you want to inventory.

find . -type f -exec ls -al {} \; | awk ' {print $3", "$5", "$6, $7, $8", "$9 }' > file_for_drive_1.csv

Note that using -type f will get all the files so -name "*" is redundant in this case.

If you don't want the hidden files use -exec ls -l rather than -exec ls -la

If you wanted to put them all in the same file, just change > to >> The >> is append.


Return to posts index


Craig Alan
Re: Drive Inventory
on Mar 12, 2011 at 5:52:45 pm

http://www.squarebox.co.uk/standalone.html

raves from media content pros

OSX 10.5.8; MacBookPro4,1 Intel Core 2 Duo 2.5 GHz
; Camcorders: Sony Z7U, Canon HV30/40, Sony vx2000/PD170; FCP certified; write professionally for a variety of media; teach video production in L.A.


Return to posts index

Rich Rubasch
Re: Drive Inventory
on Mar 27, 2011 at 2:41:33 am

OMG all that code was hurting my head. DiskCatalog Maker is what I have used since 2001. Cheap, simple, elegant. perfect.

Rich Rubasch
Tilt Media Inc.
Video Production, Post, Studio Sound Stage
Founder/President/Editor/Designer/Animator
http://www.tiltmedia.com


Return to posts index

Mike Weiner
Re: Drive Inventory
on Mar 27, 2011 at 8:17:51 pm

Rich --

and this will allow me to create a searchable list of all the files on a drive? What about a drive that is not currently mounted?

and does it do all types of files?

I assume you are talking about this software on this website: http://diskcatalogmaker.com/

Thanks,
Mike


Return to posts index


Lorena Ospina
Re: Drive Inventory
on Mar 6, 2013 at 5:11:37 pm

Does anyone know if there is a miraculous software like Disk Catalog Maker that is available for both Mac and PC. Where I can share my catalogs with both platforms?

Thank You!!!
L.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]