LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-28-2005, 07:02 AM   #1
carlosinfl
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?

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

Rep: Reputation: 31
"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, 07:19 AM   #3
MensaWater
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: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
"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, 07:41 AM   #4
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

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

Clever.

Or, maybe not.

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

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

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


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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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