How To: Find Out When A File Was Created

Today, we’re going to learn how to find out when a file was created. Odds are good that you could use the right click menu in a GUI file manager and figure it out, or you can sort by time and show details, that sort of stuff. Those being ‘easy’ we’ll learn how to find out when a file was created in the terminal.

Yeah, a lot of these articles explain how to do things in a terminal – even when there’s a nice graphical way to accomplish those same things. While it’s true that we may have different shells, we’re far more universal in the terminal than we are in a graphical desktop environment.

It’s good to learn how to do things in the terminal. If you can accomplish your goal in the terminal – you can accomplish it quickly and easily everywhere. That’s a pretty great benefit. (It’s not even unique to Linux – as you can do a whole lot via command line in Windows and MacOS.)

Also, today’s article feels a bit like work. I was hoping that it’d take longer to really start feeling that way. It’s okay. I picked a brief subject, what should be a short article, and that’ll be almost like a day off.

Find Out When A File Was Created:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, change to the directory that contains the file you want to find out when it was created. Let’s say it’s in your Documents directory:

Now, you can just use the -l flag with the ls command. That’d look like this –  showing the creation date (and maybe time, if the file is recent enough) for all the files in that directory:

That’s pretty messy, especially if you have a lot of files in the directory. So, you can specify the file for which you want to find the creation date by specifying the filename in the command itself, like so:

That’ll do it for you. Well, it should do it for you! If not, something’s broken and don’t ask me to fix it!

Closure:

There you have it… You can now tell when a file was created. It’s not a very difficult process and it’s one you can easily commit to memory. I find myself using it when I’ve created a file and then can’t find it among other files with similar names – I’ll check to wee when a file was created and figure it out that way.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe to Newsletter!
Get notified when new articles are published!
We promise to never share your email!
icon

Author: KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.