Bash how old is file




















Hi Guys, I hope one of you has already done this and is kind enough to share your script with me. I have a Solaris8 server that uses password aging for its local user accounts. I need a script that checks the age of the password and then sends the user an email if the password is about to How to find the File Age and wait for that Hi, I want to know my file is 1 hr 30 min old or not, If 1 hr 30 min old I will do some tasks in that file..

RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Forum Rules. Mark Forums Read. Thread Tools. View Public Profile for lovelysethii. Find all posts by lovelysethii. View Public Profile for balajesuri. Find all posts by balajesuri. View Public Profile for Kingcobra. Find all posts by Kingcobra. Best Gifts for Cutting the Cord. Best Bluetooth Speakers. Awesome PC Accessories. Best Linux Laptops.

Best Gaming Monitors. Best iPads. Best iPhones. Best External Hard Drives. Browse All News Articles. Smart TVs Ads. Team Comes to Workplace by Meta. Block People Spotify. Verizon Selling PS5. Windows 11 SE Explained. Windows 11 SE. Microsoft Default Browser Firefox. Google's New Pet Art. Robinhood Hack Find Downloaded Files on an iPhone. Use Your iPhone as a Webcam. Hide Private Photos on iPhone. Take Screenshot by Tapping Back of iPhone. Maybe you could in your post clarify the difference and explain the use of the negate.

Thank you for contributing and I will post a comment on the question for clarification. Thank you for contributing! You could use a script like this! Then you can find file modified after a certain date like this: newerthan "" or newerthan "last year" or newerthan "yesterday" That should do what you want. I don't think there is a built in way to achieve this otherwise.

Richard Holloway Richard Holloway 7, 2 2 gold badges 23 23 silver badges 30 30 bronze badges. This is for Centos 5. Which does have -d. Useful to know about the integer maths though.

Actually it's not. The question explicitly asked to find files older than a date, not a number of days. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta.



0コメント

  • 1000 / 1000