Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I see, if an entry in a drectory is a real file or a link?

Status
Not open for further replies.

strikelit

MIS
Joined
Sep 10, 2003
Messages
88
Location
US
Is there an AIX command that shows me is an entry in an drectory is a real file or just a link?
 
For something a little easier to parse in a shell script, you can use the [tt]file[/tt] command, like so:
Code:
$ file /sbin/telinit
/sbin/telinit: symbolic link to `init'
$

Note that both mrn and my answers relate only to symbolic links. Hard links are a little trickier, but you're probably not looking for those because they are, for all intents and purposes, actual files.

- Rod

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top