Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-21-2001, 01:10 AM   #1
LQ Newbie
Registered: Feb 2001
Location: Singapore
Posts: 5

Rep: Reputation: 0

Hi guys,

I got a problem here.
On a linux platform when we type: "ls -lt"
It will show a list of files in that directories, in addition to that on the left side of each file, there is a something like this: "-rw-rw-r--".
I want to know how to edit this, i.e. to change the status of this string.
Pls advise.
I need it urgently.
Thank YOu very much.

Kelvin Loo
Old 02-21-2001, 09:41 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
What your asking about is referring to the read, write and execute permission levels.
To change the status you would type something like this at the command:

# chmod 666 (whatever file you want to change here)
Like that above using 666 would change the string to look like -rw-rw-rw-, where this file would then only be read, write but no execution of the file. A 777 would make it -rwxrwxrwx. The r has a value of 4, w has 2 and the x is 1.
if you wanted it to look like this -rwxr--r--, it would be 744 after the chmod. Do you catch my drift on how to set this?

You can do a man chmod to learn the permission levels of each and how to set them. But remember, chmod changes this.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration