Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'No way to get file type alias from the shell?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
No way to get file type alias from the shell?
Authored by: klktrk on Mar 05, '05 05:59:25PM

Darn. I guess this hint tells me what I feared: Apparently there's no way to test a file to see if it's an alias from the shell if the Finder is not loaded. I'm looking for a way to test a file for being an aliases when in single user mode. I can test if a file is a link or not, but no way to see if it's an alias. Argh. It would be nice if there were something like get info for the shell. Like this:
getinfo filename

which would output everything HFS+ knows about the file in a parameter=value style listing.

Anyone know of such a tool?



[ Reply to This | # ]
No way to get file type alias from the shell?
Authored by: Anonymous on Mar 05, '05 09:11:29PM
Apple's developer tools includes a command line program called GetFileInfo. Its -a argument tells you if a file is an alias file or not.
/Developer/Tools/GetFileInfo -aA 'Some Alias File'
returns
1
if 'Some Alias File' identifies a file which is an alias file (and it'll return 0 otherwise).

[ Reply to This | # ]