LinuxQuestions.org
Visit Jeremy's Blog.
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 02-05-2005, 09:10 PM   #1
cajunaggie
Member
 
Registered: Jul 2004
Location: Round Rock, Texas
Distribution: Ubuntu "Dapper Drake"
Posts: 59

Rep: Reputation: 15
Changing file permissions within a directory for all files.


I have to harddrive paritions. The secondary one is owned by root. I copied the contents of my secondary to my primary. I need to change the owner and group for every file but there is about 1.5GB of stuff. Is there a way I can change the owner/group of all files within a given directory/folder through the shell or do I have to do them one at a time?
 
Old 02-05-2005, 09:24 PM   #2
damicatz
Member
 
Registered: May 2004
Distribution: FreeBSD 7, Debian "Squeeze", OpenBSD 4.5
Posts: 167

Rep: Reputation: 30
Most commands support a recursive option that allows you to handle files and files in sub-directories.

For example, if you wanted to change the owner of a home directory and all it's file and subdirectories you would do the following

chown -R user:group /home/name/*

If you just want to change the ownership of files in one directory and not it's sub-directories you can leave out the -R

Last edited by damicatz; 02-05-2005 at 09:25 PM.
 
Old 02-06-2005, 01:53 AM   #3
cajunaggie
Member
 
Registered: Jul 2004
Location: Round Rock, Texas
Distribution: Ubuntu "Dapper Drake"
Posts: 59

Original Poster
Rep: Reputation: 15
Talking

Thank you ever so much!
 
  


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
Home directory permissions changing haphazardly... zupidupi Linux - Newbie 4 04-14-2005 01:31 PM
Directory permissions changing back? elderain Linux - Newbie 0 03-08-2004 06:02 PM
recursive file permissions does not change new files in same directory PAB Linux - Newbie 2 03-08-2004 12:27 PM
Changing directory permissions Bagsy Linux - Newbie 1 07-08-2003 05:50 AM
changing permissions for entire directory jmarsh Linux - Networking 2 05-13-2003 08:12 AM

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

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