LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2007, 11:57 PM   #1
Sasie
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
must Linux really change file-date when copying?


Hi all,

In SuSe-10.1 everytime I copy a file the file-date changes to become the current date/time. This is very annoying.

Is there something (environment switch maybe?) that I can set to stop the file-date from changing?

tia

Sasie
 
Old 03-07-2007, 12:13 AM   #2
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 33
Are you using Gnome(Nautilus) or KDE(Konqueror) to copy the files?
 
Old 03-07-2007, 12:38 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Updating the file timestamp is cp standard behavior. If you use the command line, add the "-p" option to the cp command to preserve it.
 
Old 03-07-2007, 03:05 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There are three date type file attributes: Creation date, last access, and last modified. Between those three you probably have everything you need, even if cp changes the last access date and time.
 
Old 03-07-2007, 10:55 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by AwesomeMachine
There are three date type file attributes: Creation date, last access, and last modified.
Creation timestamp isn't something required to be stored by a standard compliant UNIX, so there are very few filesystems, if any, that actually allow it.
 
Old 03-07-2007, 11:01 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
True, I have never seen creation time stored.

For cp, I use cp -a which is an alias for cp -dpR
 
Old 03-12-2007, 09:36 PM   #7
Sasie
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Original Poster
Rep: Reputation: 0
to answer Sepero's Q:

***** I am using KDE (Konqueror) *****

can it be made to not change displayed file when copying files?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to change file name and append the date john_551 Linux - Software 4 08-26-2006 06:56 AM
File Creation Date in linux jayukanna General 5 08-21-2006 07:08 AM
copying linux file to windows workstation shadowsurfer Linux - Networking 3 09-17-2004 09:54 AM
linux gzip file by date antonioxcom Linux - Newbie 4 07-12-2004 12:07 AM
Copying files from a specific date dman65 Linux - Software 3 09-22-2003 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:21 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
Open Source Consulting | Domain Registration