hi all,
can u please help me in finding all ksh file in directory and including all subdirectories and then copy those files into another directory.
thanks in advance
-bali (4 Replies)
hi all,
can i get script find file & copy that file with path
for an example
sourse : /home/abc/
destination : /home/backup/
files which need to find : tmp*
copy these files with its absolute path inside
like :- /home/abc/x/y/z/tmp.txt to /home/backup/date/x/y/z/tmp.txt
thanks in... (15 Replies)
I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help.
Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
Ok i have three directories
Destination - /u/dir1 (has subdirectories dir2 which also has subdirectory dir3)
Source1 - /u/test/files/dir1/dir2/dir3
Source2 - /u/out/images/dir1/dir2/dir3
What i would like to do is copy everything from Source1 and Source2 into the Destination directory.... (3 Replies)
Ok question number two: I'd like to search a directory for multiple file types (rar, txt, deb) and depending on what's found, copy those files to folders named Rar, TextFiles, and Debs. I'm looking for speed here so the faster the script the better. I want it to be a function that I pass 1 argument... (4 Replies)
I need to be able to find all *.doc files by year last modified and then perform an action such as copy to folder: /documents/2011
the 'find' command seems to show the path but not the full file details, which includes the date modified as the ls command does.
I got this far with ls, but have... (2 Replies)
RedHat Enterprise Linux 5.4
I have some files with the extension .cdp in several directories in various mountpoints(filesystems) . I would like to find and copy all these files into a single directory /u03/diagnore/data.
How can I do this ? (3 Replies)
Hi
I'm trying to writte a script (crontab) to copy files from one location to another... this is what i have:
find . -name "VPN_CALLRECORD_20130422*" | xargs cp "{}" /home/sysadm/patrick_temp/
but that is not working this is the ouput:
cp: Target... (5 Replies)
Hi all!
I have 10.000 files having generally this format:
text text text
text num text num text num
text text text GAP number text text
text num text num text num RMS num
text num text num text num
...
what I want is to copy the files if the GAP number is lower than a value e.g. <100... (5 Replies)
Hello there wonderful people,
I am running on Solaris 10 and with the following ksh version:
strings /bin/ksh | grep Version | tail -2
@(#)Version M-11/16/88i
Suppose I want to copy files that end in _v2 from underneath /dir1/dir2/save directory to /dir1/dir2. Basically, what I’m... (12 Replies)
Discussion started by: ejianu
12 Replies
LEARN ABOUT PHP
copy
COPY(3) 1 COPY(3)copy - Copies fileSYNOPSIS
bool copy (string $source, string $dest, [resource $context])
DESCRIPTION
Makes a copy of the file $source to $dest.
If you wish to move a file, use the rename(3) function.
PARAMETERS
o $source
- Path to the source file.
o $dest
- The destination path. If $dest is a URL, the copy operation may fail if the wrapper does not support overwriting of existing
files.
Warning
If the destination file already exists, it will be overwritten.
o $context
- A valid context resource created with stream_context_create(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.4 | |
| | |
| | Changed the $context parameter to actually have |
| | an effect. Previously, any $context was ignored. |
| | |
| 5.3.0 | |
| | |
| | Added context support. |
| | |
| 4.3.0 | |
| | |
| | Both $source and $dest may now be URLs if the |
| | "fopen wrappers" have been enabled. See fopen(3) |
| | for more details. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
copy(3) example
<?php
$file = 'example.txt';
$newfile = 'example.txt.bak';
if (!copy($file, $newfile)) {
echo "failed to copy $file...
";
}
?>
SEE ALSO move_uploaded_file(3), rename(3), The section of the manual about handling file uploads.
PHP Documentation Group COPY(3)