LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Question About a Command? (https://www.linuxquestions.org/questions/linux-general-1/question-about-a-command-377692/)

carlosinfl 10-28-2005 07:02 AM

Question About a Command?
 
What would this command do to my (any) system?

Code:

chown -R us ~/.base
I know chown will take owner ship and the -R = recursivness according to the man pages but can someone please define this for me?

akudewan 10-28-2005 07:18 AM

"chown" command will change the ownership of the files. The guy who created a file is usually the owner.

The -R option means Recursive. So all files and folders in the directory ~/.base will have their ownership changed

Incase you don't know, ~ means your home directory. and ".base" is a hidden folder, since it starts with a dot.

To sum it up, the command will change the ownership of all files & folders in the .base directory in your home folder to "us"

MensaWater 10-28-2005 07:19 AM

"chown -R" does recursive ownship change as you noted.

"us" is the user name that will own the files after the chown.

"~" is a short cut meaning your home directory (~username would be someone else's home directory)

"/" is a path separator.

".base" is a hidden file or directory (all hidden files start with ".") - since you're doing a recursive chown it is likely a directory as there is no reason to do recursive on a single file.

You have to put the "/" between "~" and ".base" so it will know you mean something within your home directory. Without the "/" (i.e. ~.base) it would think you meant the home directory of the user named ".base" which doesn't exist.

Optimistic 10-28-2005 07:41 AM

All your base are belong to us!

Clever.

Or, maybe not.

http://en.wikipedia.org/wiki/All_your_base

Charred 10-28-2005 12:51 PM

Clever enough; it made ME laugh. :)


All times are GMT -5. The time now is 06:57 AM.