File modification date in unix


















Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. I found no equivalent on Unix. According to the man page on my Mac which has the BSD standard version of stat you can get the epoch time version of the modification in seconds with:. The find command is a good source for all kinds of file information, including modification time to the second:. The first argument can be a file.

The maxdepth prevents searching if a directory name is given. Ended up coding a personalized "ls -lh" for my needs. It's not that hard.. Prints something like :. In printFSObjectInfo you have full functionality of lstat system call, you can customize this to your wishes. And yes, perl comes with HP-UX. Source: Perderabo. The stat program was not part of the installation. The quickest solution for me was to use a tool such as Tectia file transfer running on my laptop, without actually doing any copying, It converts the time of last modification for you from HP-UX and provides dates and times for all files once you have logged into UNIX.

Possibly this works with other similar graphic based file transfer tools, but I have not tried yet. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Cheers, James 2 Replies. Finding modified File List after the chosen date in Korne Shell I am trying to write a Korne Shell asking the user for a date and a directory and then search recursively in this directory the list of files modified after the date chosen.

But I am not getting good results when I Test it Made changes to a file using vi editor and saved those changes now realised that the changes are not required How can I get the previous version of the file.

RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Viewed 19k times. Nish Nish 99 2 2 gold badges 5 5 silver badges 12 12 bronze badges. Add a comment. Active Oldest Votes.

It's in the GNU coreutils. For this I would try the code below: Try: ls -la grep filename Let me know if it works. Sign up or log in Sign up using Google. The ls -l command is usually used for long listing - display additional information about a file such as file ownership and permissions, size and creation date.

To list and display the last modified times, use the lt option as shown. Another way you can check the last modified date is by using the httpie HTTP command-line client tool. The tool is usually used for interacting with HTTP servers and APIs and can also check when a file residing on a web server was last modified. This wraps up this article. In this guide, we have featured various ways that you can use to list the last modified date of a file on a Linux system, and even a file hosted on a web server using the httpie tool.



0コメント

  • 1000 / 1000