LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 09-11-2007, 09:24 PM   #1
pmorg
LQ Newbie
 
Registered: Jun 2007
Location: Costa Rica
Distribution: Fedora 7
Posts: 18

Rep: Reputation: 0
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.
 
Old 09-12-2007, 07:18 AM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

Rep: Reputation: 49
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.
 
Old 09-12-2007, 09:11 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
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
 
Old 10-24-2007, 01:55 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Have you made any progress?

Do you need more help?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a linux-supported archive format that can split into multiple files? Moebius Linux - Software 3 07-11-2006 03:52 PM
how to copy-in cpio archive to temp directory jxi Slackware 2 03-08-2006 05:32 PM
Restrict exe files inside an archive files in samba paulreynand Linux - Networking 2 02-02-2006 05:07 AM
copy files from linux to windows turbo_acura Linux - General 4 11-23-2004 02:46 PM
Can't copy files from xp to linux Bruce Hill Linux - Networking 12 06-21-2003 06:31 PM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration