Easy - if you know how. - Suse

This is a discussion on Easy - if you know how. - Suse ; How do I change dates on files? I had set the wrong time on my PC, and now all new files are 10 years old. I know, change time for every set of files and reopen or copy, but there ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: Easy - if you know how.

  1. Easy - if you know how.

    How do I change dates on files? I had set the wrong time on my PC, and
    now all new files are 10 years old. I know, change time for every set
    of files and reopen or copy, but there must be a smarter way.

    Konqueror 3.5.1 (Using KDE 3.51 Level "a" SUSE 10.1.

    thanks in advance

    John

  2. Re: Easy - if you know how.

    Hi,

    John Jensen wrote:
    > How do I change dates on files? I had set the wrong time on my PC, and
    > now all new files are 10 years old. I know, change time for every set
    > of files and reopen or copy, but there must be a smarter way.


    man touch

  3. Re: Easy - if you know how.

    John Jensen wrote:

    > How do I change dates on files? I had set the wrong time on my PC, and
    > now all new files are 10 years old. I know, change time for every set
    > of files and reopen or copy, but there must be a smarter way.


    man touch

    Andreas

  4. Re: Easy - if you know how.

    John Jensen wrote:
    > How do I change dates on files? I had set the wrong time on my PC, and
    > now all new files are 10 years old. I know, change time for every set
    > of files and reopen or copy, but there must be a smarter way.


    Well, you have gotten the answer, just out of curiosity, why is this
    importand? When I have files that are date importand, I add the date to
    the filename, beacsue I am interested in what date it is about.

    Also Linux has information not only when the file was changed, but also
    when the last time was it was accessed.

    houghi
    --
    Listen do you hear them drawing near in their search for the sinners?
    Feeding on the power of our fear and the evil within us.
    Incarnation of Satan's creation of all that we dread.
    When the demons arrive those alive would be better off dead!

  5. Re: Easy - if you know how.

    John Jensen wrote:
    > How do I change dates on files? I had set the wrong time on my PC, and
    > now all new files are 10 years old. I know, change time for every set
    > of files and reopen or copy, but there must be a smarter way.
    >
    > Konqueror 3.5.1 (Using KDE 3.51 Level "a" SUSE 10.1.
    >
    > thanks in advance
    >
    > John

    Ok Im a newbie but wouldnt greping the files with a certain date piped
    to either touch or a file that can be done work?

    bob

  6. Re: Easy - if you know how.

    Hi,

    houghi wrote:
    > John Jensen wrote:
    >> How do I change dates on files? I had set the wrong time on my PC, and
    >> now all new files are 10 years old. I know, change time for every set
    >> of files and reopen or copy, but there must be a smarter way.

    >
    > Well, you have gotten the answer, just out of curiosity, why is this
    > importand? When I have files that are date importand, I add the date to
    > the filename, beacsue I am interested in what date it is about.
    >
    > Also Linux has information not only when the file was changed, but also
    > when the last time was it was accessed.


    The access time has some performance impact, which is also why ntfs sucks.
    Why? Because reading a file actually means updating the time, hence
    actually writing to disks. No read cache, slow write.


  7. Re: Easy - if you know how.

    Andreas wrote:
    > The access time has some performance impact,


    Huh? In what way?

    > which is also why ntfs sucks.
    > Why? Because reading a file actually means updating the time, hence
    > actually writing to disks. No read cache, slow write.


    I do not understand what you are saying. Are you saying that old files
    are not placed in read-cache when they are read?

    If this is the case, how many files are we talking about and what is the
    impact? Could I make my system faster by updating all files to 1 second
    ago?

    I think I completely misunderstand what is going on.

    houghi
    --
    Listen do you hear them drawing near in their search for the sinners?
    Feeding on the power of our fear and the evil within us.
    Incarnation of Satan's creation of all that we dread.
    When the demons arrive those alive would be better off dead!

  8. Re: Easy - if you know how.

    Hi,

    houghi wrote:
    > Andreas wrote:
    >> The access time has some performance impact,

    >
    > Huh? In what way?
    >
    >> which is also why ntfs sucks.
    >> Why? Because reading a file actually means updating the time, hence
    >> actually writing to disks. No read cache, slow write.

    >
    > I do not understand what you are saying. Are you saying that old files
    > are not placed in read-cache when they are read?
    >
    > If this is the case, how many files are we talking about and what is the
    > impact? Could I make my system faster by updating all files to 1 second
    > ago?
    >
    > I think I completely misunderstand what is going on.


    If a system is able to display the time some file was last accessed, this
    timestamp must obvisously have been saved somewhere. It is, on disk.
    This means write access to the hard drive when reading files. Even when
    the file is served from cache, the directory entry is updates. More (slower)
    writes as compared to same file read operatoins without noatime.

    kind regards,
    Andreas

  9. Re: Easy - if you know how.

    Andreas Hentschel wrote:
    > John Jensen wrote:
    >
    >> How do I change dates on files? I had set the wrong time on my PC, and
    >> now all new files are 10 years old. I know, change time for every set
    >> of files and reopen or copy, but there must be a smarter way.

    >
    > man touch
    >
    > Andreas

    Thank you. The rest of you. Don't bother why - I just needed to change
    the date to the correct one. The command accepts wildcards too, just if
    someone asks.

    Alway nice here, you get the correct answer within minutes.

  10. Re: Easy - if you know how.

    houghi wrote:

    > Andreas wrote:
    >> If a system is able to display the time some file was last accessed, this
    >> timestamp must obvisously have been saved somewhere. It is, on disk.
    >> This means write access to the hard drive when reading files. Even when
    >> the file is served from cache, the directory entry is updates. More
    >> (slower) writes as compared to same file read operatoins without noatime.

    >
    > Very interesting nitpicking. What is the actual delay it causes?
    >
    > houghi


    Most likely none because the write flush takes place during idle time. And
    yes one can see both the creation date (if that option is set, and normally
    the modified date. But I do not think it has any impact at least not
    enough a human would notice.

    --
    Later,
    Darrell Stec darstec@neo.rr.com

    Webpage Sorcery
    http://webpagesorcery.com
    We Put the Magic in Your Webpages

  11. Re: Easy - if you know how.

    On Tue, 2007-11-06 at 13:05 -0500, Darrell Stec wrote:
    > houghi wrote:
    >
    > > Andreas wrote:
    > >> If a system is able to display the time some file was last accessed, this
    > >> timestamp must obvisously have been saved somewhere. It is, on disk.
    > >> This means write access to the hard drive when reading files. Even when
    > >> the file is served from cache, the directory entry is updates. More
    > >> (slower) writes as compared to same file read operatoins without noatime.

    > >
    > > Very interesting nitpicking. What is the actual delay it causes?
    > >
    > > houghi

    >
    > Most likely none because the write flush takes place during idle time. And
    > yes one can see both the creation date (if that option is set, and normally
    > the modified date. But I do not think it has any impact at least not
    > enough a human would notice.
    >


    Using the noatime option on mount can gain you upwards of 5% performance
    improvement. If that's interesting. Depending on what you are doing,
    it could be very noticeable (e.g. long running tasks, etc).





  12. Re: Easy - if you know how.

    The carbonbased lifeform Darrell Stec inspired alt.os.linux.suse with:
    > houghi wrote:
    >
    >> Andreas wrote:
    >>> If a system is able to display the time some file was last accessed, this
    >>> timestamp must obvisously have been saved somewhere. It is, on disk.
    >>> This means write access to the hard drive when reading files. Even when
    >>> the file is served from cache, the directory entry is updates. More
    >>> (slower) writes as compared to same file read operatoins without noatime.

    >>
    >> Very interesting nitpicking. What is the actual delay it causes?
    >>
    >> houghi

    >
    > Most likely none because the write flush takes place during idle time. And
    > yes one can see both the creation date (if that option is set, and normally
    > the modified date. But I do not think it has any impact at least not
    > enough a human would notice.


    There certainly is a penalty in performance, most noticably in
    filesystems with spool- or log areas.
    Try to setup a busy mailserver with atime update enabled, and you soon
    wish you had it disabled.
    But most filesystems can be mounted with atime disabled (noatime in
    fstab), even NTFS (although, as with most usefull things there, it's not a
    checkbox in windows).

    Theo
    --
    theo at van-werkhoven.nl ICQ:277217131 SuSE Linux
    linuxcounter.org: 99872 Jabber:muadib at jabber.xs4all.nl AMD XP3000+ 1024MB
    "ik _heb_ niets tegen Microsoft, ik heb iets tegen
    de uitwassen *van* Microsoft"

  13. Re: Easy - if you know how.

    Chris Cox wrote:
    > Using the noatime option on mount can gain you upwards of 5% performance
    > improvement. If that's interesting. Depending on what you are doing,
    > it could be very noticeable (e.g. long running tasks, etc).


    Ok, interesting to know. So again it comes down to: if you don't know
    about it, you don't need it. If you need it, you should already know
    about it.

    A bit like: "Dad, what is sex?" "I will explain it to you when you know
    more about it then I do." ;-D

    houghi
    --
    >>>> Run the following from the bashprompt if you have the kernel sources

    for I in `find /usr/src/linux/ -name *.c`; \
    do A=`grep -i -A 1 -B 1 **** $I`;if [ "$A" != "" ]; \
    then printf "$I \n$A \n\n"; fi ;done|less

  14. Re: Easy - if you know how.

    John Jensen wrote:
    > Thank you. The rest of you. Don't bother why - I just needed to change
    > the date to the correct one.


    > Alway nice here, you get the correct answer within minutes.


    It would be nice to learn why you need it. Perhaps it is something
    people can use. Perhaps we have a better solution for it. And then
    perhaps it is something completely trivial, but let the reader be the
    judge for that.

    This is, after all, about sharing experience.

    houghi
    --
    >>>> Run the following from the bashprompt if you have the kernel sources

    for I in `find /usr/src/linux/ -name *.c`; \
    do A=`grep -i -A 1 -B 1 **** $I`;if [ "$A" != "" ]; \
    then printf "$I \n$A \n\n"; fi ;done|less

+ Reply to Thread