Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copy and modify a file if the original has changed Post 302826977 by alister on Thursday 27th of June 2013 04:37:16 PM
Old 06-27-2013
If you only need to run the job on Linux, perhaps you can use inotifywait to listen for file creation and modification, solving both problems.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. AIX

way to copy only changed files

Hello, we are going through a restructoring of file systems and will need to copy the contents of one file system to another box, then a few days later copy it again. Is there a way on the second copy to only copy files that have changed? Thanks in advance (3 Replies)
Discussion started by: zuessh
3 Replies

2. Shell Programming and Scripting

Trying to Copy Files Changed Recently

I have been toying around with a script that will copy all files altered in a development directory over to a testing directory and have been trying to construct the command to meet my needs. Basically I am using find in a directory to see what files have changed over the past 24 hours. Then if... (4 Replies)
Discussion started by: scotbuff
4 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Where can I get original copy of Unices

BSD, AFAIK, Linux, etc are developed/based upon UNIX... but they are not UNIX... I'm wandering where can I obtain a original copy of UNIX(without flavor) (1 Reply)
Discussion started by: laduch
1 Replies

5. Shell Programming and Scripting

Help with a shell script to modify one line and copy the next 9 to same file

Hi everyone, the problem is quite simple, yet I can't find an easy solution using awk. I need to search for a string in $3, then if I find this string, copy the line,modify $3, and copy the next 9 lines to the same file. My problem is in the copying of the lines... Finding and modifying... (5 Replies)
Discussion started by: Teroc
5 Replies

6. UNIX for Dummies Questions & Answers

how to copy files and record original file location?

:EDIT: I think my post name should have been labeled: how to copy files and record original file location. not "retain". Hello, this is my first post! I searched the forums a lot before posting, but was unable to answer my question. Here's my problem: There are several hundred text files... (4 Replies)
Discussion started by: willie8605
4 Replies

7. Shell Programming and Scripting

command to copy original files from links in HP-UX

I have folder ABC and files in ABC are links. I want to create the same ABC folder in different path and copy the actual files from source ABC dir. Can anyone provide command for this? Thanks in advance. (2 Replies)
Discussion started by: venkatababu
2 Replies

8. UNIX for Advanced & Expert Users

copy original files from links

I have folder ABC and files in ABC are links. I want to create the same ABC folder in different path and copy the actual files from source ABC dir. Can anyone provide HP-UX command for this? note: cp -L is not working in HP-UX Thanks in advance. (1 Reply)
Discussion started by: venkatababu
1 Replies

9. Shell Programming and Scripting

Script to echo "File permissions or ownership changed from required " when accidentally changed.

Hi All, I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :( which have similar names ( /var in root and var of some other directory ).:confused: Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies

10. Shell Programming and Scripting

Make a copy of a file when someone tries to modify the file

I wish to take a backup of the file when someone tries to modify a file say /tmp/test.txt using vi, vim, cat, copy, mv commands. I'm aware of inotify which will notify me of any changes to the file however, I wish to make a backup before and not after the changes are made to the file. I... (1 Reply)
Discussion started by: mohtashims
1 Replies
vm-install-jobs(8)					      System Manager's Manual						vm-install-jobs(8)

NAME
vm-install-jobs - queries and manages VM creation jobs that were started by vm-install SYNOPSIS
vm-install-jobs [options ...] DESCRIPTION
VMs may be created by vm-install interactively, or as backgrounded jobs. The vm-install-jobs command manages backgrounded VM creation jobs. OPTIONS
--cancel job-id Cancels the specified job. If the VM is still running, it is stopped. This command may return before the VM is completely stopped or the vm-install process has completely exited. The job is not implicitly deleted, so that the cancelation progress may be observed. --delete job-id Deletes the specified job. The job must be in one of the FINISHED, FAILED, or CANCELED states. The VM's configuration is deleted, as are any disks that were created during the job. --detach job-id Detaches the created VM from the specified job. The job must be in the FINISHED state. The job is deleted, but the VM's configura- tion and its disks are left intact. --list Lists all known VM creation jobs, by ID. One job ID is output per line. --status job-id Outputs the status of the specified job. JOB STATES
Every job is always in one of the following states: 0: SETTINGS 1: PREP_INSTALL 2: INSTALL 3: POST_INSTALL 4: RUNTIME_CONF 5: RUNTIME 6: FINISHED 7: FAILED 8: CANCELED The normal progression is from state 0 to state 6. States 6, 7, and 8 are terminal states. JOB STATUS
Querying the job status will print (to stdout) a number of key/value pairs. The possible keys and their meanings are: exit The exit code of the VM creation job. This key is only present once the job is in one of the states FINISHED, FAILED, or CANCELED. To interpret the meaning of the exit code, see vm-install(8) id The job ID. Always present. inotify A filename to monitor (via inotify(7) ) for state changes. The recommended inotify mask to use is IN_CLOSE_WRITE. Always present. log The location of the log file. Always present. pid The process ID of the VM creation job. This key is only present if the VM creation process is still running. The PID is used internally to cancel the job. state The job's current state. See JOB STATES. Always present. uuid The VM's UUID. This key is only present once all of the VM's settings have been gathered. vnc The last known location to view the VM's console via VNC. Note that the presence of this key does not guarantee that the VM is cur- rently running. When no authentication is necessary, the URL will be ip::port. If authentication is necessary, the URL will be username:password@ip::port. DIAGNOSTICS
A zero exit code indicates success; non-zero indicates failure. Note that the exit code of this tool indicates the success of the job management command. It does not represent the success or failure of the job itself. SEE ALSO
To interpret the exit code of a job or of this command, see vm-install(8) To monitor state changes of jobs, see inotify(7) To report problems with this software or its documentation, visit http://bugzilla.novell.com 2007-02-01 vm-install-jobs(8)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy