12-02-2005
Thanks to both.
rsync seems to do the job, but I'm still having some issues, such as certain files not being copied - I get this:
mkstemp "path/filename.jNLmL7" failed: Invalid argument
...which is double dutch to me. Any ideas about this?
The files that do copy seem to lose their application association too, which is not a deal breaker, but is a bit of a PITA. I suspect this is something to do with me moving files around behind the Finder's back. I might chase this bit up on the Apple forums.
Cheers!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have the following question :
As far as I know unix doesn't store file creation dates.
Would that imply the following?
tar -cvzf backup.tar --newer
is equal to:
tar -cvzf backup.tar --newer-mtime ? (1 Reply)
Discussion started by: jamesbond
1 Replies
2. UNIX for Dummies Questions & Answers
Is there a way to use the find command to locate files newer than a specific date?
Thanks!
--Alex (4 Replies)
Discussion started by: vertigo23
4 Replies
3. Solaris
Dear all,
Can you help me in copying files newer than speciifc date
Thanks in advance,
Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies
4. UNIX and Linux Applications
I have tried winscp, filezilla to copy data from windows xp SP2 machine to the sun sparc unix machine. However speed is around 120 to 130 kb/sec. I do have lot of files & with large size.
So I switched to windows command prompt & transfered few files using sftp command. Its very fast as compared... (0 Replies)
Discussion started by: _prasad
0 Replies
5. Shell Programming and Scripting
Actually i want to copy some file locations to another. so if directory not exist it should create that.
i used cp -R/r but it copies only one directory. it doesnt make directory inside directory..
so i want this should create them automatically.
One more thing if file already exist there... (8 Replies)
Discussion started by: ajayyadavmca
8 Replies
6. Shell Programming and Scripting
I want the same effect as "cp -u" but without create missing files, it is possible ?
ps: bash (2 Replies)
Discussion started by: mrxrsd
2 Replies
7. Solaris
Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS.
I have tried to do it using:... (14 Replies)
Discussion started by: dragonov7
14 Replies
8. UNIX for Dummies Questions & Answers
We had an arrant rsync run and started copying over new files from one system to another.
Although this is what we will want to do at some point, for now, we want to maintain the system as it was a few days ago.
I am looking for a script that will find files that are newer than x days.
... (5 Replies)
Discussion started by: Leyva62
5 Replies
9. Shell Programming and Scripting
How do I list al files in a folder with a creation date/time newer than 6 hours? (2 Replies)
Discussion started by: locoroco
2 Replies
10. Shell Programming and Scripting
I only want the file copied if it is newer. But it still copies the file?
zip -u Ubuntu_Documents.zip ./*
cp -u Ubuntu_Documents.zip $DOCS_Backup/Ubuntu_Documents_`date +"%Y-%m-%d-%H-%M"`.zip (5 Replies)
Discussion started by: drew77
5 Replies
LEARN ABOUT OPENSOLARIS
mkdtemp
mkstemp(3C) Standard C Library Functions mkstemp(3C)
NAME
mkstemp, mkstemps, mkdtemp - make a unique file name from a template and open the file
SYNOPSIS
#include <stdlib.h>
int mkstemp(char *template);
int mkstemps(char *template, int slen);
char *mkdtemp(char *template);
DESCRIPTION
The mkstemp() function replaces the contents of the string pointed to by template by a unique file name, and returns a file descriptor for
the file open for reading and writing. The function thus prevents any possible race condition between testing whether the file exists and
opening it for use. The string in template should look like a file name with six trailing 'X's; mkstemp() replaces each 'X' with a charac-
ter from the portable file name character set. The characters are chosen such that the resulting name does not duplicate the name of an
existing file.
The mkstemps() function behaves the same as mkstemp(), except it permits a suffix to exist in the template. The template should be of the
form /tmp/tmpXXXXXXsuffix. The slen parameter specifies the length of the suffix string.
The mkdtemp() function makes the same replacement to the template as in mktemp(3C) and creates the template directory using mkdir(2), pass-
ing a mode argument of 0700.
RETURN VALUES
Upon successful completion, mkstemp() returns an open file descriptor. Otherwise -1 is returned if no suitable file could be created.
ERRORS
The mkstemp(), mkstemps(), and mkdtemp() functions can set errno to the same values as lstat(2).
The mkstemp() and mkstemps() functions can set errno to the same values as open(2).
The mkdtemp() function can set errno to the same values as mkdir(2).
USAGE
It is possible to run out of letters.
The mkstemp() function does not check to determine whether the file name part of template exceeds the maximum allowable file name length.
The tmpfile(3C) function is preferred over this function.
The mkstemp() function is frequently used to create a temporary file that will be removed by the application before the application termi-
nates.
The mkstemp() function has a transitional interface for 64-bit file offsets. See lf64(5).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
|ATTRIBUTE TYPE |ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |See below. |
+-----------------------------+-----------------------------+
The mkstemp() function is Standard. The mkstemps() and mkdtemp() functions are Stable.
SEE ALSO
getpid(2), lstat(2), mkdir(2), open(2), tmpfile(3C), mktemp(3C), attributes(5), lf64(5), standards(5)
SunOS 5.11 22 Feb 2006 mkstemp(3C)