Sponsored Content
Operating Systems Linux Red Hat Separate the apache user file and move or copy some were Post 302895183 by babinlonston on Saturday 29th of March 2014 03:16:20 AM
Old 03-29-2014
Quote:
Originally Posted by Peasant
You will extend the find command :
Code:
find . -type f -user apache -exec echo mv {} /tmp/backup/ \;

Remove echo if the result satisfies.
Change \; for \+ for performance if you need it.

Also, storing backups in /tmp is a bad idea since it is deleted after every reboot.

I would recommend making a new filesystem for backup.
Yes its worked for me , Could you please give me little explanation what this will do ?
Code:
{} /tmp/backup/ \;

Can't understand what is {} will do and \;
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Copy-Move file problem

Hello, I made a script to copy files from one directory to another and move file after the copy is done. When files are present in the source directory there is no problem but when no file are present I'm getting an error. Please help !! --------------------- #!/bin/bash ... (2 Replies)
Discussion started by: lsimoneau
2 Replies

2. UNIX for Dummies Questions & Answers

How to copy/move to a file with a special character as the 1st char in the filename?

I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell. I am able to create files with special characters in the filenames...e.g. cp -pv foo.gif \*special.gif cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies

3. UNIX for Dummies Questions & Answers

tar, zip multiple separate directories and move the results to another volume

TIA, I'm using FreeBSD 6 I have a series of Directories (A,B,C,...Z). Each directory has files and other directories within it. I want to compress the contents of each top directory into a single file so that I get an archive of each directory (for example, A.gzip) AND and want to move... (5 Replies)
Discussion started by: jccbin
5 Replies

4. UNIX for Dummies Questions & Answers

Unable to copy or move file

I am trying to move a file that is in the root directory. I suspect it is an old file created by someone when the system was installed. I am testing accessing the file by doing a copy but the command does not find the file. I am operating as root. We are HP-UX B.11.23 I do long listing and... (3 Replies)
Discussion started by: phcorn
3 Replies

5. Shell Programming and Scripting

Search through subfolders and move them into separate folder on the base of file size

Hello guys I am sure that you will help me on this issue as you did earlier::) Scenario : I have a folder named "XYZ". It consist many sub-folders and subfolder contain severals files. there may be abc.dat in each subfolder. Now i want to seperate subfolders on follwing conditions- if abc.dat... (12 Replies)
Discussion started by: infiant
12 Replies

6. Shell Programming and Scripting

Copy/move file which are not currently in use.

Hello experts, I'm doing a shell script that able to copy or move files. My situation is i have a drive ( lets say its S drive) where its receive all the files from mainframe i need to copy all the file from S drive to T drive. but only those files that are finished copied from mainframe... (5 Replies)
Discussion started by: CelvinSaran
5 Replies

7. UNIX for Dummies Questions & Answers

need assistance on Calling DB user from separate file in Shell script

Hi All, I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want... (1 Reply)
Discussion started by: sathish.tn
1 Replies

8. Shell Programming and Scripting

Calling DB user from separate file in Shell script

Hi All, I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want... (3 Replies)
Discussion started by: sathish.tn
3 Replies

9. Solaris

Can't erase/move/copy file!

Hey everyone!. I have a problem with a file that doesn't allow any operation on it. I can't rm,mv,cp nor any other operation to it, I get the following errors: bash-2.05# mv ora_2527.aud /bkp mv: cannot access ora_2527.aud bash-2.05# cp ora_2527.aud /bkp cp: cannot access ora_2527.aud... (4 Replies)
Discussion started by: dragonov7
4 Replies

10. UNIX for Dummies Questions & Answers

How to move file from one directory to other of only particular user?

I written unix script where a pdf file generates. But if the script is used by multiple people at a time it generates same pdf with two different owner names and creating a problem with permission while moving the file. is there a way where i can move the file filtering with the user? (4 Replies)
Discussion started by: lakers646
4 Replies
dgcfgbackup(1M) 														   dgcfgbackup(1M)

NAME
dgcfgbackup - create or update VxVM volume group configuration backup file SYNOPSIS
/usr/sbin/dgcfgbackup [-f dg_conf_path ] dg_name DESCRIPTION
The dgcfgbackup command saves the VxVM configuration for a disk group in a default or alternate configuration backup file (see the descrip- tion of the-f option). By default, dgcfgbackup is run automatically each time that a VxVM command changes the VxVM configuration. In this case, it always uses the default configuration backup file. An existing default configuration backup file is renamed with an extension of .old. Options and Arguments dg_name Specifies the name of a disk group. -f dg_conf_path Saves the configuration using an alternate file name specified by dg_conf_path. If this option is omitted, the default file name is /etc/vxvmconf/dg_name.conf. EXIT CODES
dgcfgbackup exits with a zero status on successful completion. An non-zero exit status indicates that errors occurred when information from the disk group was being accessed. EXAMPLES
Back up VxVM configuration information for disk group testdg in the default backup file /etc/vxvmconf/testdg.conf: dgcfgbackup testdg Back up VxVM configuration information for disk group datadg in the alternate configuration backup file /tmp/datadg.backup: dgcfgbackup -f /tmp/datadg.backup datadg NOTES
It is recommended that any alternate configuration backup file be created in the root file system (as is the case with the default path name). This facilitates disk group recovery during maintenance mode, such as after a system crash. AUTHOR
dgcfgbackup was developed by the Hewlett-Packard Company. SEE ALSO
dgcfgrestore(1M) VxVM 5.0.31.1 24 Mar 2008 dgcfgbackup(1M)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy