To change the ownership at one shot


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting To change the ownership at one shot
# 1  
Old 01-21-2009
To change the ownership at one shot

i have a directory in which i have Multiple files:
Following are they====

-rw-r--r-- 1 root root 886 Jan 21 16:38 trunkn.xsd
-rw-r--r-- 1 root root 244 Jan 21 16:38 trunknameCache.xml
-rw-r--r-- 1 root root 1240 Jan 21 16:38 subscribercache.xsd
-rw-r--r-- 1 root root 406 Jan 21 16:38 subscriberhe.xml
-rw-r--r-- 1 root root 8442 Jan 21 16:38 regi.ini
-rw-r--r-- 1 root root 6346 Jan 21 16:38 protocol.xml
-rw-r--r-- 1 root root 453 Jan 21 16:38 protocol.txt
-rw-r--r-- 1 root root 10638 Jan 21 16:38 log4cxx.xml_template
====================================================
I want to change the owner ship at once.if chown agnity:agnity trunkn.xsd will change only one file ownership...i Want to change ownership at one shot.......

Can any one please Help me on this?
# 2  
Old 01-21-2009
Either chown agnity:agnity file1 file2 file3 file4 .... or, if there are no other files, chown agnity:agnity *
Take a look at the man page for more info
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change ownership of a directory

I want to change the ownership of a directory ONLY. my id id1 owns the files under the /mypath/bin but /mypath/bin is owned by id2 If i log into id2 I can't do chown id1 /mypath/bin (1 Reply)
Discussion started by: klarue
1 Replies

2. Shell Programming and Scripting

File Ownership Change

Hi, I have several directories under an upload directory where differnt users upload their files (with exxactly the same file name every week) using their own user ids. There is a requirement that once any user uploads the file I have to clean that file and remove extra whitespaces and... (3 Replies)
Discussion started by: vbhonde11
3 Replies

3. Shell Programming and Scripting

My first shot at variables

Okay, so im setting up a script to start my internet dependent scripts once I am connected to the net. It got complicated because of the different networks I frequent but it goes something like this: n=1 iwconfig wlan0 > wireless.txt m= grep -c MGHS /home/jake/Scripts/wireless.txt o= grep -c... (7 Replies)
Discussion started by: arcnsparc
7 Replies

4. Shell Programming and Scripting

change multiple ownership

Good afternoon, Sir's, i owuld like to search for some advice, whats the fastest way to change multiple files ownership. For HostnameA will be their basis, for what ever files and permissions that hostnameA has, it should replicate the permissions and ownership to hostname B. $hostname... (1 Reply)
Discussion started by: invinzin21
1 Replies

5. UNIX for Dummies Questions & Answers

I am the owner,yet not allowed the change the ownership

sm860 IS the owner of the files below,but yet sm860 cannot change the ownership to bpt3a1.Please let me know why ? See below for details --- sm860@unixs741_DEV:/usr/gdp/home/ftp/bpt3a1/incoming/ahdb/T5/pcasav/daily $ ls -l pcasav* -rw-r--r-- 1 sm860 gdpintegrators 821 Sep 21 16:15... (8 Replies)
Discussion started by: MSHETTY
8 Replies

6. Shell Programming and Scripting

Delete all occurence of a word in one shot

i have a file called file1 cat file1 i am namish namish lives in India India and namish both are good. I want to delete all the occurences of namish in one shot,if i do it with sed i guess all the lines will be deleted containing the pattern.Suggest me any idea without AWK. Thanks... (6 Replies)
Discussion started by: namishtiwari
6 Replies

7. UNIX for Dummies Questions & Answers

unix screen shot

i would like to see an unix screen shot if anyone could take a screen shot of unix (7 Replies)
Discussion started by: royal
7 Replies

8. UNIX for Dummies Questions & Answers

Print Multipul Fiels as One shot

Hi there This is my first post. I just want to know the best way to print N number of files as one shot. Let's simulate the case ... > ls file1.txt file2.txt file3.txt file4.txt file5.txt What is the best way to print all this files.. what I'm doing now is / > print... (9 Replies)
Discussion started by: geoquest
9 Replies

9. UNIX for Dummies Questions & Answers

How do I change ownership of a directory and all of it's files.

How do I change ownership of a directory and all of it's files without changing permissions? (1 Reply)
Discussion started by: mborin
1 Replies
Login or Register to Ask a Question