Sponsored Content
Top Forums UNIX for Dummies Questions & Answers 'cp' command: preserve group ownership Post 302751103 by Peasant on Thursday 3rd of January 2013 07:32:11 AM
Old 01-03-2013
You can use a pax oneliner perhaps (posistion yourself in working directory)
Code:
pax -rw -pe -s /myfile.txt/mycopy.txt/g myfile.txt $PWD/

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

File group ownership changing automatically

Hi everyone, Need help with an issue. The group ownership of files on my Solaris system is getting changed automatically. Could someone tell me the reason why? And how could I correct it? One more info- everytime the ownership changes, it changes to "x". Thanks :confused: (1 Reply)
Discussion started by: top_gun
1 Replies

2. Shell Programming and Scripting

command to add users to group

does a command exist to add users to more than one group? i think the usermod command can do this but i'm not really sure. past ways of me doing this has always been to just hack the /etc/group file and put the user in whatever group i need him to be in. however, vi..ing files like /etc/groups... (2 Replies)
Discussion started by: Terrible
2 Replies

3. Shell Programming and Scripting

Rsync - Preserve owner/group with different UID/GID

Dear Folks :-) I want to rsync some files between some servers and preserve files owner and group (not UID or GID), in some machines UID and GID are differents, for example: a) In the rsync server: # stat vbseo.php File: `vbseo.php' Size: 26758 Blocks: 56 IO... (1 Reply)
Discussion started by: Santi
1 Replies

4. UNIX for Advanced & Expert Users

command to copy files with original ownership

Hi, I need a command that to copy files from others and to keep files' ownership. Example: I copy file.txt from users "abc" to my local, and file.txt is own by user "abc" in local. Thanks in advance! (3 Replies)
Discussion started by: need_help
3 Replies

5. Linux

failed to preserve ownership operation not permitted

Hi i have written one backup script in linux workstation.The backup script will do zipping files and moved to the backup directory(i,e /net/ts-bcn/sb_backup/sand). #So while moving zipped files to the backup directory i am getting some error like this error:mv:failed to preserve ownership... (2 Replies)
Discussion started by: yogks
2 Replies

6. Shell Programming and Scripting

command to group records

hi, i have records like this supplier,product, persons involved 10,150,ravi@yahoo.com 30,200,ravi@yahoo.com 20,111,payal@gmail.com 40,211,ravi@yahoo.com i want to write a command which displays values like this 10,30,40,ravi@yahoo.com for ravi@yahoo.com if there are n number of... (7 Replies)
Discussion started by: trichyselva
7 Replies

7. UNIX for Advanced & Expert Users

Permission denied, but user is owner and has group ownership too

Folks, I have a problem with a particular file, that seems to have some kind of lock on it, that takes around 1 hour approx to timeout. I have used lsof and nothing has an open file handle on it, yet I cannot open it. My user/group owns the file and I can create edit/delete files in... (6 Replies)
Discussion started by: scottrus
6 Replies

8. UNIX for Dummies Questions & Answers

regarding changing ownership and group

i am able to change the mode using chmod and able to change permission. but i am not able to change group and ownership. getting as invalid can any one help me regarding this . (4 Replies)
Discussion started by: satheeshkr_cse
4 Replies

9. UNIX for Dummies Questions & Answers

Tar command to preserve the folder/file arrangement

Hi, I do have question for un tar a file. I have several 'tar'ed files. For example: SRS.tar.bz2. I was trying to untar them in a linux server using the command: tar xvjf SRS.tar.bz2 It worked perfectly. but when I open this file in my mac computer all the files are extracted into a... (7 Replies)
Discussion started by: Lucky Ali
7 Replies

10. Shell Programming and Scripting

How to add using awk command for a group?

hi all below is the input file contains a code followed by amount input file 345,5.86 346,20.58 399,10.00 400,12.00 i need the output in the following way outputfile totalsumof345and346,26.44 totalsumof399and400,22.00 (10 Replies)
Discussion started by: hemanthsaikumar
10 Replies
syscallbyproc.d(1m)						   USER COMMANDS					       syscallbyproc.d(1m)

NAME
syscallbyproc.d - syscalls by process name. Uses DTrace. SYNOPSIS
syscallbyproc.d DESCRIPTION
syscallbyproc.d is a DTrace OneLiner to a report of the number of system calls made by process name. This is useful to identify which process is causing the most system calls. Docs/oneliners.txt and Docs/Examples/oneliners_examples.txt in the DTraceToolkit contain this as a oneliner that can be cut-n-paste to run. Since this uses DTrace, only users with root privileges can run this command. EXAMPLES
This samples until Ctrl-C is hit. # syscallbyproc.d FIELDS
first field This is the process name. There may be several PIDs that have the same process name, for example with numerous instances of "bash". The value reported will be the sum of them all. second field This is the count, the number of system calls made. DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver- bose descriptions explaining the output. EXIT
syscallbyproc.d will sample until Ctrl-C is hit. AUTHOR
Brendan Gregg [Sydney, Australia] SEE ALSO
procsystime(1M), dtrace(1M), truss(1) version 1.00 May 15, 2005 syscallbyproc.d(1m)
All times are GMT -4. The time now is 11:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy