LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   View a File's Permission in ther Terminal (https://www.linuxquestions.org/questions/linux-newbie-8/view-a-files-permission-in-ther-terminal-366912/)

darkarcon2015 09-25-2005 12:31 PM

View a File's Permission in ther Terminal
 
Is there a command that will show me a file's permissions while in the terminal? I thought that there might be an attribute under the `chmod' command, but I didn't see any. Thanks for any help.

dcdbutler 09-25-2005 12:45 PM

Code:

$ ls -ld
Think that should do it

david1941 09-25-2005 12:49 PM

I use: ls -l [filename] to see the permissions. output looks like this:

[drf@maplepark drf]$ ls -l waiver.txt
-rw-rw-r-- 1 drf drf 2988 Sep 6 17:12 waiver.txt
[drf@maplepark drf]$

showing owner read and write; group read and write; and other read.

dcdbutler 09-25-2005 12:55 PM

david 1941 is correct. The "d" is unnecessary unless you wish to view the permissions for a directory instead of a file, but you can still view the file permissions ok using "ls -ld <file>"


All times are GMT -5. The time now is 04:18 AM.