LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-28-2021, 06:53 AM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
Question 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?


I came across chown cli option from man page: "chown root /u" . I can't understand the explaination and can't find any related info in internet.

According to my search so far, i can't locate any chown command come with "/u" option.. What on earth is that ?

Code:
man chown

EXAMPLES
       chown root /u
              Change the owner of /u to "root".

       chown root:staff /u
              Likewise, but also change its group to "staff".
 
Old 12-28-2021, 06:56 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,982

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
/u is not an option but an [example] directory or file to work on.
 
2 members found this post helpful.
Old 12-28-2021, 08:52 AM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,150

Rep: Reputation: 393Reputation: 393Reputation: 393Reputation: 393
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.
 
Old 12-28-2021, 08:57 AM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
Look at:
Code:
chown --help
man chown
apropos chown
info chown
 
Old 12-28-2021, 09:03 AM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
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

Last edited by teckk; 12-28-2021 at 09:04 AM.
 
Old 12-28-2021, 10:05 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
https://www.linuxquestions.org/quest...n-pages-38130/
 
Old 12-28-2021, 10:06 AM   #7
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
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 View Post
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
 
Old 12-28-2021, 10:09 AM   #8
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jmgibson1981 View Post
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>
 
Old 12-28-2021, 10:12 AM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by andrewysk View Post
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.
 
Old 12-28-2021, 10:14 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,982

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by andrewysk View Post
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).
 
Old 12-28-2021, 11:14 AM   #11
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
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.

Anyway, Thanks for your effort.
 
Old 12-28-2021, 04:14 PM   #12
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,737

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
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!

Last edited by scasey; 12-28-2021 at 04:16 PM.
 
Old 12-31-2021, 08:16 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,982

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by andrewysk View Post
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.
Probably the best was to ask here.
 
Old 12-31-2021, 05:35 PM   #14
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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.
 
Old 12-31-2021, 05:55 PM   #15
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Gparted - to "flag" or NOT to "flag" as "raid" ? helen314 Linux - Newbie 3 06-28-2019 03:02 PM
Help Required adding flag on packet and routing packet based on flag over ssl tunnel. sskhan Linux - Networking 1 02-02-2018 03:56 PM
Weird: MOD4(flag) not working on 1 PC only ! Xeratul Linux - Desktop 1 05-27-2007 05:33 PM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 08:52 AM
Is there a man page on how to use man page? jdruin Linux - Software 2 10-30-2004 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:13 PM.

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