Just A Small Guideline

Feel free to browse the site. Don't be afraid to leave comments, they're supportive.
Please follow me on Twitter @ehldmnt and retweet my posts.

Wednesday, April 3, 2013

A Bit More on Chmod & Chown

There are a few more things that I would like to introduce when it comes to the chmod and the chown command, one of these things being options that can be passed to reduce the amount of typing the user does in the command line. I'm certain that there are those of us who have had yet to learn how to touch type in QWERTY and even fewer of us who have learned to type in DVORAK. There is such thing as OCTAL NUMBERS that I would like to introduce in this chapter.

Octal Numbers

With octal numbers:
  • They are any number between 0 and 7.
  • Each digit in an octal number represents three binary digits.

Now, for further explanation, you lay out a chart like this for better understanding:


OctalBinaryFile Mode
0000---
1001--x
2010-w-
3011-wx
4100r--
5101r-x
6110rw-
7111rwx

How This Can Be Applied to Chown

Now, you would use octal numbers as an 'option' rather than an argument when you're making a change to a file, but unlike most options that we have seen, it does not possess a "-" before it. That's okay, different programs might not even contain options and might just have the program itself and yet the use of the program, or command, may vary. For example:

chmod 777 text.txt.




With an ls -l, we'd see that everyone can see, edit, and execute the file called "text".


But what if we don't want to put in that extra typing into the command line to see what the changes made were? Then we use the '-c' [called 'change'] option to print only if there was a change. If you want an output regardless, use the '-v' [called verbose] option.



These same commands can be passed to someone who wants to print the change in a file [if there is one], or just the supposed adjustments made regardless of whether there is an actual change or not.

And Those Two Options Are The Same For Chown

Simply 'chown -c olduser newuser' where the 'olduser' is the original owner and 'newuser' is the new owner, will print a change only if there is one, but 'chown -v olduser newuser' will print a change regardless.

That's it.


Thanks for taking the time to read this and be sure to comment if there is anything that you are fuzzy about or that you do not understand. useradd

userdel


usermod

1 comment:

Unknown said...

tiếng anh giao tiếp cho trẻ em

chung cư newskyline
chung cư hateco hoàng mai
chung cư hà nội

dịch vụ hoàn thuế gtgt
dịch vụ kế toán thuế trọn gói
dịch vụ quyết toán thuế
khoá học kế toán thuế
trung tâm kế toán
dịch vụ báo cáo thuế
không thể đánh bại họ, qua nửa giờ đại lục thì hai mươi tượng đá khổng
lồ đó tự nhiên cũng sẽ vỡ ra!
Tina giải thích.
- Nói như vậy, chúng chính là một loại vật thể linh hồn rồi? - Nghe thế,
Đoạn Vân mỉm cười hỏi.
- Cứ xem như vậy đi! - Tina trả lời.
Cười cười rất quỷ dị, Đoạn Vân nói :
- Tinh Linh nữ thần đại nhân, tiếp theo ngài còn có chiêu thức gì nữa
không vậy? Hoặc ngươi triệu hoán vài tượng đá khổng lồ như vậy đánh với
chúng ta được không?
Tinh Linh nữ thần cắn răng, nói :
- Đoạn Vân, bên ngươi có nhiều cao thủ như vậy, chẳng lẽ ngươi muốn khi
dễ một nữ tử yếu đuối như ta sao?

Nghe câu "nữ tử yếu đuối", Đoạn Vân đổ mồ hôi lạnh! Một bà lão yêu quái
sống ngàn năm thực lực cấp mười ba rồi, còn nữ tử yếu đối cái nỗi gì?
Ngươi quả là trơ trẽn.

Sau khi đảo con ngươi vài vòng, Đoạn Vân nói:
- Nữ thần đại nhân, như vậy đi,ngươi triệu hoán một tượng đá khổng lồ
thực lực cường hãn khác, ta sẽ phái ra một thủ hạ ra chiến đấu với vật
mà ngươi triệu hoán. Chỉ cần ngươi thắng, ta có thể thả ngươi đi. Nhưng
trước khi thả ngươi, ngươi phải hứa với ta một điều kiện, đó là ma thú

dich vu ke toan noi bo
dịch vụ dọn dẹp sổ sách trọn gói
kế toán cho giám đốc