LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Copy archive files in Linux? (https://www.linuxquestions.org/questions/linux-general-1/copy-archive-files-in-linux-584023/)

pmorg 09-11-2007 08:24 PM

Copy archive files in Linux?
 
I'm trying to port everything I do in Windoze over to Linux. One job requires pulling modified files from the working copy of my web site and moving them into another folder ready to FTP with the correct directory structure. In DOS that would be:

xcopy *.* /m /s

Is there anything like that that I can do in Linux? I don't see any switches in CP that addresses the archive flag.

I'm running FC7 BTW.

oskar 09-12-2007 06:18 AM

For the one who could actually answer this:
xcopy:
Quote:

/M Copies only files with the archive attribute set, turns off the archive attribute.
Quote:

/S Copies directories and subdirectories except empty ones.
*.* becomes * in linux since file extentions are not necessary, and * can be any character including '.' or no character at all.

archtoad6 09-12-2007 08:11 AM

Welcome to LQ.

I like your goal.

As w/ many, if not most, things Linux there are many, perhaps too many, choices. Depending on how deep & complicated you want to get, Amanda & rsync may be worth looking at. Check them out on Wikipedia & through Google Linux.

As you may have guessed, there is no archive bit in Linux. However the modification time "mtime" is tracked & available, as when you do ls -l. Also available is the inode change time, "ctime". Do not confuse it w/ MS' file create time.

If you want to go deeper into Linux file time stamps, start here:
Quote:

Although touch provides options for changing two of the times—the times of last access and modification—of a file, there is actually a third one as well: the inode change time. This is often referred to as a file's ctime. The inode change time represents the time when the file's meta-information last changed. One common example of this is when the permissions of a file change. Changing the permissions doesn't access the file, so the atime doesn't change, nor does it modify the file, so the mtime doesn't change. Yet, something about the file itself has changed, and this must be noted somewhere. This is the job of the ctime field. This is necessary, so that, for example, a backup program can make a fresh copy of the file, including the new permissions value. Another operation that modifies a file's ctime without affecting the others is renaming.
from:
13.4 touch: Change file timestamps

archtoad6 10-24-2007 12:55 PM

Have you made any progress?

Do you need more help?


All times are GMT -5. The time now is 05:47 PM.