The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Adding Multiple Lines to Multiple Files dayinthelife Shell Programming and Scripting 2 06-04-2008 11:50 AM
Splitting input files into multiple files through AWK command arund_01 Shell Programming and Scripting 3 05-13-2008 09:17 AM
Multiple search in multiple files maxvirrozeito Shell Programming and Scripting 2 12-13-2007 01:32 PM
when I try to run rm on multiple files I have problem to delete files with space umen UNIX for Dummies Questions & Answers 1 09-20-2005 03:20 AM
Searching multiple files with multiple expressions Anahka Shell Programming and Scripting 6 01-07-2004 06:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-16-2005
Teganii Teganii is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 2
CHOWN Multiple Files

We have a test and training directory. The test is a copy of training. We need to change the ownership and group for a list of specific files from the training directory. Is there a way to feed the CHOWN command the list of files we need changed? We are performing the CHOWN as root. Thanks in Advance.

Last edited by Teganii; 08-16-2005 at 12:01 PM..
  #2 (permalink)  
Old 08-16-2005
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
Code:
chown -R user:group training
  #3 (permalink)  
Old 08-16-2005
Teganii Teganii is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 2
I guess I'm not making myself too clear. The specific files in the training directory have different owners. I have created a list of the files in the training directory that I need to have the ownership changed in the test directory. It's getting that list of files into CHOWN that I'm having the issue with. I tried chown user:group < file_list with no luck. I'm just getting into the UNIX so my learning curve has been VERY steep.
  #4 (permalink)  
Old 08-16-2005
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,929
Maybye something more like
Code:
chown user:group `cat list_of_files`
Note that those are backticks, not ordinary single quotes -- same key as ~ but without shift. What it does is execute the command inside it and convert it's output into text, so it would print the contents of the file and convert them into a string which it feeds as commandline parameters into chown.
  #5 (permalink)  
Old 02-04-2008
mattydee mattydee is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 1
Worked perfectly for me.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0