SnipIT No 1: Checking Permissions in Solaris

SnipIT is a series of short blogs containing useful information in an easily digestible format.
First up; How to check permissions of files and folders in Solaris. This may seem obvious to some but to new-comers it should prove useful.
File Permissions
ls -al
The a option lists all the files in the directory, including hidden files (those that start with “.”). Without this option, those files will not be listed.
The l option lists the files in the “long” format, in other words; the permissions on the file, the number of hard links, the owner, group, size, date and filename.
Folder Permissions
This is very similiar to file permissions:
ls -ld
As above, the l options lists details in the “long” format. The d option lists information about directories and symbolic links.
Without specifing a directory, information on the current directory will be displayed, using ls -ld will return information on a sub-directory of the current one, unless you drill back by using the ../ path.
Link to information on hard links and symbolic links will come shortly.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *