Is there away to create files with old date in Solaris

Posted on 2014-08-12
Last Modified: 2014-08-12
Is there away to create files with old date in Solaris?
If yes; How ?
Question by:Oranew

    Author Comment

    Is there a way to create files with old date in Solaris.
    It looks fishy but I like to create some files with the Old dates.
    LVL 20

    Expert Comment

    On our unix system i used  the  touch command to set back the origal timestamp of files after migration to a new unix system.   The touch command has an optional extra argument to do so.
    But I don't know if it available in the same way on solaris.
    LVL 33

    Expert Comment

    Change the system date, create the file, change the system date back...?
    LVL 16

    Accepted Solution

    flow01 is right, in Solaris you can also use touch command, ie:

    /usr/bin/touch -t yyyymmddhhmm filename

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now