I want to put a big folder on Windows b开发者_StackOverflow中文版ox into one archive (tar, zip, gzip, whatever). Is there a tool that can preserver all folder timestamps?
The timestamps have to be preserverd after unpacking the archive on a Linux box.
Any ideas are welcome!
tar will do fine. gzip is for single file compression, zip won't preserve directory timestamps.
EDIT: Sample.
tar jcpf backup.tbz2 thedir
rm -rf thedir
tar jxpf backup.tbz2
Timestamps preserved.
EDIT2:
cygwin tar
correctly preserves timestamps. Tested with tar jcf
on cygwin, tar jxf
on linux.
EDIT3:
WinRar preserves directory timestamps, linux unrar
restores them properly.
DotNetZip preserves timestamps on folders, as well as files.
It seams that there's no soluation to all my requirements:
- Pack on Windows an preserve folder timestamps
- Unpack on Linux and preserve original folder timestamps
- I prefer a copy/paste aka portable installation of the tool, otherwise the deployment gets to complicated.
- A partial, drop in cygwin installation by just copying the necessary exe and dll files works, but doesn't preserve the folder timestamps.
- Full cygwin installation is not easily possible since the windows client machines are on terminal server (see http://www.cygwin.com/faq/faq.setup.html#faq.setup.setup-fails-on-ts)
- Zip doesn't work because unzip on ubuntu cannot preserver folder timestamps, even if the zip tool of choice does.
精彩评论