Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Make all files in dir same date time

Discussion in 'General Discussion' started by durangod, May 30, 2019.

  1. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    452
    Likes Received:
    28
    Trophy Points:
    78
    cPanel Access Level:
    Website Owner
    Hi, i just started a developement area on my web server (shared hosting) and i would like to make all of the files the same date and time starting off so i know what has changed since the beginning.

    I used to work on them on the PC but now i want to move the dev area to a protected area on the server. And i want to have all the files in the dir have the same date and time as i begin.

    Is there a way to do this on a dir?

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,909
    Likes Received:
    127
    Trophy Points:
    368
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    cd /to_to the_directory_you_want_to set_the_date

    find -print | while read filename; do touch -t 201905291500 "$filename"; done


    the above will edit the date of all files in the directory to May 29 15:00
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  3. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    452
    Likes Received:
    28
    Trophy Points:
    78
    cPanel Access Level:
    Website Owner
    Thanks ill ask my host to do that for me as i dont have root access, appreciate that :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,528
    Likes Received:
    2,180
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I've marked this thread as solved.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice