LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-11-2011, 02:31 AM   #1
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
chown -R


Hi all

As you see in the thread title, this question is about the argument -R
In the man pages i found this:
Code:
-R, --recursive
              operate on files and directories recursively
but, my english isn't so good, so what do they mean with
Quote:
operate on files and directories recursively
??

because i do these commands
Code:
# chown nagios.nagios /usr/local/nagios
# chown R nagios.nagios /usr/local/nagios/libexec
and i don't really understand what the difference is between the two, who does he use the argument -R in the second one and not in the first one??

thanks in advance

Kind regards

Brownie
 
Old 05-11-2011, 02:50 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Recursion is a repetition of a function in a similar way; often it refers to nested repetition. In a file system context, it refers to applying the same function on a file/directory, and repeating this on the subdirectories, and so on down to the bottom of the directory tree.

So the '-R' flag on chown means to change ownership not just of the parameter file/directory, but of any files or directories within that directory.
 
1 members found this post helpful.
Old 05-11-2011, 03:13 AM   #3
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Original Poster
Rep: Reputation: 12
thanks now it makes sense to me !!!

Kind regards

Brownie
 
Old 05-11-2011, 09:30 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
http://en.wikipedia.org/wiki/Recursion
 
  


Reply

Tags
chown, recursive


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on chown ? your_shadow03 Linux - Newbie 4 11-21-2009 03:58 AM
using chown luusac Linux - General 8 08-22-2008 08:32 PM
Chown -R Jakeh2k1 Linux - General 3 10-31-2004 05:23 PM
chown -R ujotne Programming 3 02-25-2004 01:02 PM
chown Sathe Linux - General 13 10-14-2002 12:25 PM


All times are GMT -5. The time now is 06:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration