Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-28-2005, 08:02 AM   #1
Senior Member
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Question About a Command?

What would this command do to my (any) system?

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?
Old 10-28-2005, 08:18 AM   #2
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364

Rep: Reputation: 30
"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"
Old 10-28-2005, 08:19 AM   #3
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
"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.
Old 10-28-2005, 08:41 AM   #4
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
All your base are belong to us!


Or, maybe not.

Last edited by Optimistic; 10-28-2005 at 08:42 AM.
Old 10-28-2005, 01:51 PM   #5
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
Clever enough; it made ME laugh.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command question satimis Linux - Newbie 2 11-24-2004 09:59 AM
who command question Malique Linux - Newbie 2 03-22-2004 03:18 AM
SU command question downinthemine Linux - Newbie 25 07-31-2003 09:21 PM
Command Question Siki Linux - General 3 07-29-2003 04:34 PM
Command Question gauge73 Linux - Newbie 2 02-13-2003 09:18 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:41 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