Hi
I am a shell-script newbie and am looking to synchronize certain files in two directory structures.
Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over.
I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
sorry guys can some please give me a hint how to achieve this in a slick oneliner?
delete files older than 5 minutes in specified directory (recursively)
peace (3 Replies)
I have to write a shell script which can delete all the files and directories recursively inside the specified directory but should not delete the specified directory.
Please some body help me in writing the script. (3 Replies)
Hi,
find . | xargs -s 47518 can list all the files and directories recursively , is there any possibility to copy only files from directories and subdirectoreis once it is listed. Please help
Thans & Regards
Uma (3 Replies)
Display the number of files in a directory and recursively in each subdirectory
To look something like below, for example
/var 35
/var/tmp 56
/var/adm 46
Any ideas how can we do this? :wall: (1 Reply)
I want to recursively cat the content of files in a directory e.g.
find /etc -type f -exec cat {} \;
But I want it to print the file name first and then the content. For example let's say /etc/statetab and /etc/colord.conf will be printed first then I want the output to look something like;
... (6 Replies)
Hello!
I know what i s recursion, but can't imagine what shoudl be "recursicve copying" of files?
Please, what should mean:
cp -r /home/hope/files/* /home/hope/backup
Can someone helpme with a simple example?
Many thanks!!! (6 Replies)
I love the -newerct flag for the Cygwin find command on windows.
Can I use "/usr/bin/find . -newerct '3 hours ago'" to conditionally copy a directory tree so that only the files in the directory tree that are younger than 3 hours are copied to my destination directory such that the directory... (4 Replies)
Hi.
I found many scripts in the web of achieving this.
But I like to use this one
find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst
But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command?
My... (7 Replies)
Is it possible to only copy selected files+its directories when you are copying recursively?
find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print
From the above line, I want to only copy *txt and *ini files from /OriginalFolder/*
... (4 Replies)
Discussion started by: apacheLinux
4 Replies
LEARN ABOUT HPUX
cmcp
cmcp(1m)cmcp(1m)NAME
cmcp - Copy files between Serviceguard nodes
SYNOPSIS
cmcp [-rv] [src_node:]src_file [...] [dest_node:]dest_file
DESCRIPTION
cmcp copies files and/or directories between Serviceguard nodes.
cmcp is limited in several ways. cmcp is best suited for situations where other remote copy facilities are not available. For a more full
featured tool for copying files between Serviceguard nodes, see ccp(1m) provided by Distributed Systems Administration Utilities.
To use this command, the local user must have the root access role on each of the involved nodes. For more information on Serviceguard
access control policies, see the manual, Managing Serviceguard.
Paths may be relative to the current working directory or specified absolutely. The current working directory on a remote node is assumed
to be the same as the local node's directory. Copies between two remote hosts are permitted.
If a file or directory already exists on the destination node, the destination node's copy will be overwritten with no prompting.
The cmcp command is not suited for large files or large numbers of files and may result in a heavy load on the command and Serviceguard
daemons. Other tools such as ccp should be considered for these purposes.
Options And Arguments
-r Recursively copy entire directories.
-v Verbose output will be displayed.
src_node
Serviceguard node to retrieve the file from. Defaults to the local node.
src_file
Path to source file on src_node.
dest_node
Serviceguard node to copy file to. Defaults to the local node.
dest_file
Path to copy src_file to on the dest_node.
RETURN VALUE
cmcp returns the following values:
0 Successful completion.
1 Command failed.
EXAMPLES
Copy the local file /etc/hosts to remote node node1
cmcp /etc/hosts node1:/etc/hosts
Copy the remote file /etc/passwd on node1 locally
cmcp node1:/etc/passwd /tmp/passwd.poe
Copy a local script directory to a remote node
cmcp -r /etc/cmcluster/scripts node1:/etc/cmcluster
AUTHOR
cmcp was developed by HP.
SEE ALSO rcp(1), scp(1), ccp(1m), cmsync(1m), cmexec(1m), cmdo(1m), cmquerycl(1m), cmviewcl(1m)
Requires Optional Serviceguard Software cmcp(1m)