[SOLVED] weird chown option that's only available in man page.. what on earth is chown root /u ? is /u is an option/ flag to chown command?
Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One thing I know for certain is that many man pages aren't exactly understandable to most people. Is one of the frustrations many have, myself included when were are told "go read the man pages". That being said in this case I'm amazed they didn't put something like chown root /path or something. U is kind of random out of nowhere. If you are already familiar with the command line then you understand it immediately. But to a person who is just learning it doesn't make much sense, especially if they come from a Windows background where cmd options are passed that way.
Last edited by jmgibson1981; 12-28-2021 at 08:53 AM.
what are these ? lol You just gave me more HOMEWORK to do.. it is a link to chain linked to another.. That's why it takes a lot of time for me to learn something.. because from trying to install slax iso onto usb, i have to learn how to convert 9660iso into hybrid iso, and to learn to convert, i want to understand loop device... and from there i landed on chown.. .and from chown /u i am diverted to roff2text and ps2pdf all these things (that i have never heard before).. .. no end.. rabbit hole.. lol .. but thanks for letting me know there is such cli on my system...
Quote:
Originally Posted by teckk
And if it helps you:
Code:
man -t chown | ps2pdf - chown1.pdf
man chown | roff2pdf > chown2.pdf
man -P cat chown > chown1.txt
man chown | roff2text > chown2.txt
man chown | col -b > chown3.txt
man -t chown | ps2ascii - chown4.txt
man chown | roff2html > chown1.html
man chown | groff -mandoc -Thtml > chown2.html
man -Hfirefox chown
man -Hdillo chown
One thing I know for certain is that many man pages aren't exactly understandable to most people. Is one of the frustrations many have, myself included when were are told "go read the man pages". That being said in this case I'm amazed they didn't put something like chown root /path or something. U is kind of random out of nowhere. If you are already familiar with the command line then you understand it immediately. But to a person who is just learning it doesn't make much sense, especially if they come from a Windows background where cmd options are passed that way.
Who would have know /u is refering to a directory ? why /u ? usually a directory should be <directory>
i want to understand loop device... and from there i landed on chown.. .and from chown /u i am diverted to roff2text and ps2pdf all these things (that i have never heard before).. .. no end.. rabbit hole.. lol ..
Welcome to Linux documentation! We've all been there. You start with one thing and before you know it, you're leafing through man pages without end.
Who would have know /u is refering to a directory ? why /u ? usually a directory should be <directory>
That is "obvious" if you are familiar with that chown tool. That is not an option, because those are always started with a - and not the permission itself, so it can be only the last argument, which is a FILE (see man page).
Hii hazel
I have read thru your how to read man page article..
I must admit, it is very infomatic.. but for certain part that i don't understand; it is hard for me to imagine what you said.. If you include some photo or example, it would be much easier for people like me who rather learn by example.
One of the first things one needs to learn how to do in any new environment is how to read the documentation. Since I started coding back in the 70s I’ve had to learn at least eight or nine documentation systems (anyone remember Burroughs railroad diagrams…in 3-ring binders?)
As has been said, *nix man pages are one of the most challenging, probably because they are written by several (thousands?) different people/groups. hazel’s guide is excellent!
Hii hazel
I have read thru your how to read man page article..
I must admit, it is very infomatic.. but certain part that i don't understand; it is hard for me to imagine what you said.. If you include some photo or example, it would be much easier for people like me who rather learn by example.
Anyway, Thanks for your effort.
Your question is unclear. What part is what you don't understand?
This was an example (man chown). There is no common and general way. As it was written:
Quote:
As has been said, *nix man pages are one of the most challenging, probably because they are written by several (thousands?) different people/groups.
Your question is unclear. What part is what you don't understand?
I was refering to this.. it said the man page is organized as such.. especially "devices, File formats, Miscellaneous, System administration. " I have no idea where are these located... hence i said if got simple diagram ... or example, it would clear up my mind.. but i guess not important, because i usually don't use these portions of man.
Code:
How man pages are organised
There are eight sections in the manual. The division is not by subject but by the type of entity being described:
User commands. These are commands that anyone might use to get work done. Graphical as well as cli commands are included.
System calls. These are C functions that are of interest to programmers but not ordinary users. They allow programs to invoke the help of the kernel for a variety of tasks such as hardware access or file access.
C library subroutines. Again, these are of interest to programmers only. All Linux programs use the C library (glibc) and therefore use these functions. Some of them are more programmer-friendly wrappers for system calls. Others deal with tasks like arithmetic and string processing.
Devices. Devices are defined as anything that the kernel can read from or write to. Some of the best known ones are described here.
File formats. Here you will find recipes for all the most important system files in Linux. These files mostly reside in the /etc directory and are editable by the root user. It is good practice to check for a man page and read it before carrying out an edit.
Games. Not a large section!
Miscellaneous. If it doesn't fit in anywhere else, it goes here.
System administration. Commands that are usually used by system administrators, and most of them require root access to work.
Many of the man pages give examples on how to use the command. Most expect the user to have a basic understanding of the command line and how to read the usage part at the top (the synopsis).
For example, with chown I see this.
Code:
NAME
chown - change file owner and group
SYNOPSIS
chown [OPTION]... [OWNER][:[GROUP]] FILE...
chown [OPTION]... --reference=RFILE FILE...
This tells me the command (chown) is followed by options (given below) then the owner or owner:group to assign, then the file (one or more) that is to be acted upon.
Thus the example "chown root /u" is really easy to understand. In english it means change ownership of /u to the user root.
Almost all basic commands are command --> option --> file and if you can remember that you will not be caught by surprise by the examples. Also, remember that examples are examples and not to be taken literally.
Last edited by computersavvy; 12-31-2021 at 05:59 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.