This turned out to be quite complex and interesting . Please test on expendable data.
My proposed solution appears grossly inefficient because it invokes cpio for every file. On a modern system it is hard to beat for speed.
The script copies the file and then deletes the file.
See both "man find" and "man cpio" for the interaction between "find" and "cpio" when copying files.
Last edited by methyl; 04-01-2010 at 08:42 PM..
Reason: spellin
Hi all,
I have installed an application (RRDTool) in /usr/local directory, Can any one tell me how I can move this to some other location along with the libraries.
Thanks in Advance. (3 Replies)
I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure,
say location 1,
/home/rick/tmp_files/1-12/00-25/
here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
There are two similar directory structures existing, e.g. old/ and new/, where
old/d1/d2/d4/, old/d1/d2/d5/, old/d1/d3/d6/ and old/d1/d3/d7 contains some files and now I want to move those files from each folder to new locations new/d1/d2/d4/, new/d1/d2/d5/, new/d1/d3/d6/ and new/d1/d3/d6/.
The... (1 Reply)
Hi Experts,
I am using below script and facing some problems..
cd /home/user/test
rm ftp://ftp.log
Example: A_Bachfile_09292011.txt
A=`ls -1 "A*.txt"`
compress $A
C=`ls -1 "A*`
hostname="test.gmail.com"
user="raju"
Password="******"
ftp -n $hostname <<EOF >>ftp.lpg... (4 Replies)
Hi Guys,
I need to write a script that will loop on all of my oracle databases on a server and move archivelogs from archive destination to a different location.
I do have a function to loop on all databases on a server. I want help in writing a fuction to dynamically get the archive... (1 Reply)
Hi friends,
I have one XML file having below structure :-
INput XML file :-
<?xml version="1.0" encoding="UTF-8"?>
<START>
<A=value1>
<attr name1="a1">
</A>
<B=value2>
<attr name2="b1">
<attr name3="c1">
</B>
</START>
output xml file should be
=== (3 Replies)
hi,
when i do ftp from unix to laptop which is running a windows os, it lands in a root folder.
can i move a file from this root ftp folder to any other location in my laptop
say , c:\files\ folder?
i used rename command inside ftp , but it says incorrect parameter. (5 Replies)
A) I would like to achive following actions using shell script. can someone help me with writing the shell script
1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using
find . -name "*" -print | xargs grep -li 1367A49001CP0162 >... (1 Reply)
Discussion started by: GG2
1 Replies
LEARN ABOUT DEBIAN
crm_resource
PACEMAKER(8) System Administration Utilities PACEMAKER(8)NAME
Pacemaker - Part of the Pacemaker cluster resource manager
SYNOPSIS
crm_resource (query|command) [options]
DESCRIPTION
crm_resource - Perform tasks related to cluster resources. Allows resources to be queried (definition and location), modified, and moved
around the cluster.
OPTIONS
-?, --help
This text
-$, --version
Version information
-V, --verbose
Increase debug output
-Q, --quiet
Print only the value on stdout
-r, --resource=value
Resource ID
Queries:
-L, --list
List all resources
-l, --list-raw
List the IDs of all instantiated resources (no groups/clones/...)
-O, --list-operations
List active resource operations. Optionally filtered by resource (-r) and/or node (-N)
-o, --list-all-operations
List all resource operations. Optionally filtered by resource (-r) and/or node (-N)
-q, --query-xml
Query the definition of a resource (template expanded)
-w, --query-xml-raw
Query the definition of a resource (raw xml)
-W, --locate
Display the current location(s) of a resource
-A, --stack
Display the prerequisites and dependents of a resource
-a, --constraints
Display the (co)location constraints that apply to a resource
Commands:
-p, --set-parameter=value
Set the named parameter for a resource. See also -m, --meta
-g, --get-parameter=value
Display the named parameter for a resource. See also -m, --meta
-d, --delete-parameter=value
Delete the named parameter for a resource. See also -m, --meta
-M, --move
Move a resource from its current location, optionally specifying a destination (-N) and/or a period for which it should take effect
(-u) If -N is not specified, the cluster will force the resource to move by creating a rule for the current location and a score of
-INFINITY NOTE: This will prevent the resource from running on this node until the constraint is removed with -U
-U, --un-move
Remove all constraints created by a move command
Advanced Commands:
-D, --delete
Delete a resource from the CIB
-F, --fail
Tell the cluster this resource has failed
-R, --refresh
(Advanced) Refresh the CIB from the LRM
-C, --cleanup
(Advanced) Delete a resource from the LRM
-P, --reprobe
(Advanced) Re-check for resources started outside of the CRM
Additional Options:
-N, --node=value
Host uname
-t, --resource-type=value
Resource type (primitive, clone, group, ...)
-v, --parameter-value=value
Value to use with -p, -g or -d
-u, --lifetime=value
Lifespan of migration constraints
-m, --meta
Modify a resource's configuration option rather than one which is passed to the resource agent script. For use with -p, -g, -d
-z, --utilization
Modify a resource's utilization attribute. For use with -p, -g, -d
-s, --set-name=value
(Advanced) ID of the instance_attributes object to change
-i, --nvpair=value
(Advanced) ID of the nvpair object to change/delete
-f, --force
EXAMPLES
List the configured resources:
# crm_resource --list
Display the current location of 'myResource':
# crm_resource --resource myResource --locate
Move 'myResource' to another machine:
# crm_resource --resource myResource --move
Move 'myResource' to a specific machine:
# crm_resource --resource myResource --move --node altNode
Allow (but not force) 'myResource' to move back to its original location:
# crm_resource --resource myResource --un-move
Tell the cluster that 'myResource' failed:
# crm_resource --resource myResource --fail
Stop a 'myResource' (and anything that depends on it):
# crm_resource --resource myResource --set-parameter target-role --meta --parameter-value Stopped
Tell the cluster not to manage 'myResource':
The cluster will not attempt to start or stop the resource under any circumstances. Useful when performing maintenance tasks on a
resource.
# crm_resource --resource myResource --set-parameter is-managed --meta --parameter-value false
Erase the operation history of 'myResource' on 'aNode':
The cluster will 'forget' the existing resource state (including any errors) and attempt to recover the resource. Useful when a resource
had failed permanently and has been repaired by an administrator.
# crm_resource --resource myResource --cleanup --node aNode
AUTHOR
Written by Andrew Beekhof
REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org
Pacemaker 1.1.7 April 2012 PACEMAKER(8)