Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Using Terminal to Create List of File Kinds

I'm looking for a way through Terminal to list all file kinds in a given folder. I'm not interested in a list of all files.


This is for Araxis Find Duplicate Files, so I can refine my search by what it terms 'Pattern or UTI.' (For instance, where 'Kind' is 'Adobe Photoshop document,' the 'Pattern or UTI' is 'com.adobe.photoshop-image.')


Thank you!

Mac mini, OS X Mavericks (10.9.1)

Posted on Feb 21, 2014 8:42 AM

Reply
5 replies

Feb 21, 2014 9:29 AM in response to Susan Swartz1

Susan Swartz1 wrote:


This is for Araxis Find Duplicate Files, so I can refine my search by what it terms 'Pattern or UTI.' (For instance, where 'Kind' is 'Adobe Photoshop document,' the 'Pattern or UTI' is 'com.adobe.photoshop-image.')


Thank you!

Just curious but you have so many duplicate files in a folder that you cannot find what you are looking for in the results?


If you know what kind of file you are looking for, you can use

mdls path&filename

to list the metadata to find the UTIs for a specific file


mdls ~/Pictures/myphoto.jpg

wil list all the metadata (including UTIs) for this file


Once you find the UTI for a file, you can then use it in Araxis.


-> https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/mdls.1.html

-> https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UT IRef/Articles/System-DeclaredUniformTypeIdentifiers.html

Feb 21, 2014 10:44 AM in response to Susan Swartz1

Thanks for everything so far.


I thought I could compare what’s on an external drive with what’s on my internal (and then delete the duplicates on my external), if I knew how to input the file kind into Araxis Find Duplicate Files. The program keeps crashing on me when voluminous files are involved, so I can't compare my entire external drive at once to my internal. Because of this, I thought I 'd try and work it by addressing only individual or just a few file kinds at a time.


I’d love suggestions for something easier so I could feel safe in deleting en masse, without worrying that I’m deleting some personal data file.


What I have is the result of crashes and recoveries and various different disks and writeovers and overall and in short, a great big giant mess. I’m trying to clean up what’s mostly junk but I don't know for sure which folders contain only junk and not some personal data that's not also on my internal drive. (Great, huh — ).


By way of example, below are subfolders contained in a FileSalvage folder. Each subfolder has files of the kind named on its corresponding subfolder. (Sorry to make this sound complicated. I couldn't figure out a simpler way to say what's probably pretty simple.)


Continuing thanks.

_______________


Subfolders:


M3GPP video file

Adobe Photoshop

AIFF sound

Apple Compressor

Apple GarageBand Sound & Projects

Apple iDVD

Apple Keynote Presentation

Apple Logic Express and Logic Pro

Apple Pages

AppleScript

ASF movie

Automator Workflow

AVI (Audio Video Interleaved) movie

binhex archive

BMP image

bz2 compressed tar

C Source code

Digital Video & iMovie Movies

DreamWeaver Actionscript

EPS (Encapsulated PostScript)

FileMaker 5 Database

Flash swf

GIF (Graphics Interchange Format)

GIMP (Graphics)

Google Earth KMZ files

gzip archive

HTML

iCal Events

JPEG

Keychain File

M4A (iTunes music)

M4P (iTunes encrypted music)

m4v video

Mail (Mail.app received email)

Mail (Mail.app sent email)

Mail (mbox standard mailbox file)

Microsoft Excel Documents

Microsoft PowerPoint Documents

Microsoft Word Documents

MIDI sound

MP3

mp4 video

mpeg media

Ogg Vorbis

OpenDocument Spreadsheet (OpenOffice.org & others)

OpenDocument Text (OpenOffice.org & others)

PDF

PNG (Portable Network Graphics)

QuickTime Media

RealMedia

RTF (Rich Text Format) text

Stuffit SIT

Stuffit SITX

Targa image

TIFF (Tagged Image File Format)

TurboTax

WAV sound

WMA audio

WMV video

Using Terminal to Create List of File Kinds

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.