LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2007, 12:57 AM   #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, 01:13 AM   #2
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 32
Are you using Gnome(Nautilus) or KDE(Konqueror) to copy the files?
 
Old 03-07-2007, 01:38 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,649

Rep: Reputation: 391Reputation: 391Reputation: 391Reputation: 391
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, 04:05 AM   #4
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,829

Rep: Reputation: 257Reputation: 257Reputation: 257
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, 11:55 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,649

Rep: Reputation: 391Reputation: 391Reputation: 391Reputation: 391
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, 12:01 PM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
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, 10: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


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 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 07:56 AM
File Creation Date in linux jayukanna General 5 08-21-2006 08:08 AM
copying linux file to windows workstation shadowsurfer Linux - Networking 3 09-17-2004 10:54 AM
linux gzip file by date antonioxcom Linux - Newbie 4 07-12-2004 01:07 AM
Copying files from a specific date dman65 Linux - Software 3 09-22-2003 11:16 AM


All times are GMT -5. The time now is 07:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration