Jump to content

Ftp With Original Date


Sasun

Recommended Posts

I've never looked into it - I always have that 'problem' in that the date of the files uploaded to the FTP are actually the date of the transfer, and not the date of the last modification of the file.

 

There maybe there's a utility to help track transfers and file save dates, but I'm not sure. How important is this (to know the actual dates?)

Link to comment
Share on other sites

I am migrating to a new unix machine, and with the lack of file documentation the dates are a great help to me. I guess it is not critical but having the right dates is quite essential for me as I am a minimalist when it comes to documenting or remembering what file was created when and why. For example, someone will make an inquiry about an old project referring to an email. I will check the date of the email, then look for programs and files created around that date and will quickly refresh what I have done before. Now if I don't have the correct update date it will be much harder to find anything.
Link to comment
Share on other sites

Off the top of my head, an easy solution may be to tar the files, ftp, then untar.

Hmm... that's a good solution Sip, I am willing to spend time tarring and untarring if that is the cost. Actually I haven't used tar before, do you know if tarring keeps the old files? (like winzip). It would cause me space issues. And can you tar a file that is already compressed?

Link to comment
Share on other sites

tar doesn't compress. It just packs files together for archiving. Then you can use gzip or zip the tar. There may be an option to delete the old files not sure. But the way I do it, it just creates an archive in addition to the files.

 

To tar all the files in a directory:

 

tar -cvf tarfile.tar *

 

to untar

 

tar -xvf tarfile.tar

 

I tried it in Solaris and it preserves file dates.

 

The other option maybe to export the ftp directory and actually mount it as part of the file system. Then to move the files.

Link to comment
Share on other sites

I tried tar, it works great (except some weird write permission issues which could be for some other reason). I like particularly the {-I include-file} option, it is very helpful.

Sip, as always you are on top of giving a useful advice :) I don't think there is an easier way to do this task. Thanks ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...