Find Recently Modified Files

Over the past couple of years, I’ve done a lot of articles about file management; this one will help you find recently modified files. There’s nothing too complicated about this, so most of my readers should be able to follow along.

There are a number of reasons to find recently modified files. Perhaps you need to assess a file system that shouldn’t have been altered. You may need to do so for some accountability process. Then again, you could want to check a system to see what’s changing and eating up your disk space.

You might want to find recently modified files for all sorts of reasons. Heck, you might have forgotten where you placed a file but recall that you did so within the past 48 hours. This can help you narrow down your search, helping you find the file more quickly.

Of course, this will be in the terminal. That’s how we do things around here. This will also be portable. You need only the find command and you’ll certainly have that available by default.

The find Command:

As I said, you’ll need the find command. This will be installed by default. You can verify that find is available with this command:

The output should match this:

Next, you’ll want to check the man page (with man find) which will show you that this is the correct tool for the job. Notably, it says this:

find – search for files in a directory hierarchy

Yup. That’s what we want to do. 

The find command is very capable and will seem complicated to the newer Linux users. It may even push some more advanced users away. I aim to make Linux approachable, so we’ll only be worried about a couple of flags.

The type Flag:

The first flag we’ll be using is the type flag. If you check the man page, you’ll see that there are many types. We’ll specify f which signifies we wish to find regular files.

The newermt Flag:

While you’re on the man page you will see references to newer but nothing specific about newermt. It’s a reference to time. Specifically, it means less than or equal to. For example, a file that’s one day old will be listed in the results if you ask for files one day old or newer. That’s what we’ll be doing in this article.

Find Recently Modified Files:

While you will find that you have the find command available in any distro I can think of, you’ll also need to know that this is an exercise that requires the terminal. There are GUI options out there, but we’ll be using the terminal. So, press CTRL + ALT + T and let’s get started!

The syntax of the command would be this:

In our case, we’re going to use the ~/Downloads directory in our examples.

The "time frame" is where things get interesting. For the find command, you can almost use plain English. The command understands seconds, minutes, hours, days, weeks, months, and years.

Let’s say you want to scan your Downloads directory for files that you have added within the past four weeks. Well, simply use this command:

If you want to search for files within the past three months, use this command:

In the case of that command, it will find any files newer than (or equal to) three months of age. It’s a very simple command to use once you understand the syntax.

You do have to use numbers. 

If you want to quickly test this, try the following:

You could have even specified that in seconds:

You can also put dates in there.

Let’s say you want to find files newer than February 1st, 2024. You can do that. If you live in the US, you might have to use a date format that you’re not used to. So, the basic syntax would be:

Or, for today’s exercise:

I’m not sure if it’s possible to tell it to use the US date formatting. I was unable to make that work in the two attempts I made at it. Let’s just say that I didn’t invest a whole lot of energy.

There’s a lot more to the find command, but this is one way to use it. The goal is small bites that help make Linux more acceptable. Even I can be overwhelmed and I’ve been doing this for years.

Closure:

Well, if you’ve ever wanted to find recently modified files, you now have the tools to do so. While there’s a lot to this command, it’s possible to use the command without being fully versed in the matter. You don’t have to know everything to take advantage of the tools. Just like you don’t have to be a carpenter to know how to swing a hammer well enough to seat a nail.

Hmm… This article isn’t even all that long!

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Show Running Processes

Your Linux system will have a lot of things running and these things have their own process, so let’s learn how to show running processes in the Linux terminal. This is something that’s a bit more advanced than most regular desktop users will need, but it’s still worth knowing.

You may not realize it, but you have a whole lot of processes running. These processes are what makes your system work. Without them, you’d have no activity. There’s a lot you could learn about processes, such as how they’re not all owned by your user account and how they all have their own process identification number (known as a PID).

None of those things are important for today’s article.

Today, we’re just going to show running processes in the terminal. It’s not a very complicated thing – and I’ll show you a couple of things you can do with this exercise.

You won’t need to install anything. We’ll be using the ps command that is almost certainly installed by default.

The ps Command:

The ps command is exactly the tool we want to use. It’s used to show running processes, the goal of this very article. You can verify that ps is available (and it is, it has been around since the UNIX days as I recall) with this command:

If you check the man page, you’ll confirm that this is the right tool for the job:

ps – report a snapshot of the current processes.

This is pretty self-explanatory. We’ll be using that very command to show running processes on your Linux box. Well, I suppose this would also be valid for the other *NIX OSes, like BSD and probably MacOS. I don’t use those OSes, so I can’t confirm the availability of the ps command – but it’s pretty likely to be there and perform the same task.

Show Running Processes:

As I mentioned above, you’ll need an open terminal for this exercise. You can open your terminal from your application menu. You can usually just press CTRL + ALT + T and your terminal will open.

The ps command reads the files in the /proc directory and doesn’t need elevated permissions to run. Some of the processes will not be owned by you, so acting on this information may require elevated permissions.

With your terminal open, simply run the ps command in the terminal:

As you can see, that’s not a lot of running processes. It doesn’t show them all.

If you want to see all the running processes:

Or, if you want to really use the ps command to get a lot of information:

Now, you don’t always want that much information at once, so try this:

There are times when you’ll want to use the ps command for a purpose, such as finding the PID of an application that’s frozen. To do that, you can pipe it to grep and limit the output. For example:

There’s a lot more to the ps command, so check man ps for more information. This is just scratching the surface.

Closure:

Well, this ended up shorter than I expected. I don’t want to dive in too deep. The goal is just a quick overview, but I expected it to take longer to describe this stuff. Fortunately, it’s a fairly easy subject – on the surface. Dig into the man page and you’ll see there’s quite a bit more that you can do.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Short: Automatically Add An Extension To Multiple Files In The Linux Terminal

This short article will have limited usage as it shows how to automatically add an extension to multiple files in the Linux terminal. This is something not everyone needs to know, but something you need to know if you need to know it.

Let me explain…

First, I wrote a snippet of terminal code to help out a forum user. I decided that it was valuable enough to share with the larger world. As it’s just a snippet, it can be a short article.

In this case, the user had recovered many images and the recovered file names did not have a .jpg extension. They were going to manually edit a thousand files to add the .jpg extension. That’s not something you need to do. You can automatically add an extension to multiple files in the Linux terminal.

So, how does this work…

Automatically Add An Extension To Multiple Files:

Open your terminal and navigate to the appropriate directory. You can usually use your GUI file manager to navigate to the directory and then open the directory from that window. Otherwise, just use the cd command to navigate to the right directory.

The syntax to add the extension to all those files in that directory would be:

What we’re doing is using the rename command to search for anything with zero to one character and the asterisk is all characters including spaces. You should have rename available by default. I first tried using an asterisk in both places, but the command was having none of it.

If you want to test this, open your terminal and try this:

That should show you the newly created files.

Next, just run:

Now confirm that you’ve made the changes:

Your output should match this one:

See? You’ll have added .jpg to all the files in that directory. We could use something like the find command and make it recursive, but this is good enough.

Closure:

There you have it. You have a short article that will show you how to add an extension to multiple file types. I figured this was useful enough to be shared with the wider world, maybe saving someone a bit of time and showing others how easily you can process things in the Linux terminal.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Top 10 Reasons Why I Use Linux

I figured today would be a fine time to have a fun article and I’ve never done a listicle, so I figured I’d write the top 10 reasons why I use Linux. After all, we don’t always have to have something productive. Sometimes we can just have a nice and fun article that doesn’t require much effort.

And this is a low-effort article! (EDIT: It turns out it is more effort than expected. I did not expect that.)

Disclosure, I did write Why I Use Linux some time ago. For fun, I won’t refer to the previous article. Besides, that was in essay format more than a listical. I’ve never done one of those before! 

We can also have some fun with this. 

These are MY top 10 reasons why I use Linux. These might not be your top 10 reasons. You might not agree with my reasons. If you don’t agree, or you want to add to the list, we can fight about it in the comments! 

So, without further ado…

Top 10 Reasons Why I Use Linux:

  1. Linux is just plain easy. 

    I realize that not everyone will think this is true, but I find it to be true. Things are logical and make good sense (generally speaking). Linux doesn’t require babysitting. I can ignore it and get my work done.

    There is a learning curve, but it’s not difficult. You can be up and running without any real help. For the most part, the installation is a guided process and then there’s enough of a base to get you started without even needing to add many applications. It all just works together and even updates are simplified to the point of being trivial.

  2. Linux has a great community.

    Linux is known to be full of people that just tell you to read the manual. While this is sort of true, it just means that they expect you to have put the work in. You should usually have tried to resolve your problem and you should have a basic understanding of the applications you’re trying to use.

    If you find the community to be unfriendly when you ask a question, read this:

    How To: Ask A Good Support Question

  3. There are many choices about how you do things.

    You can pick and choose what you want and what you don’t want. If you don’t want a desktop environment, you can go without one. If you want a different desktop environment, you can get one. As this site will show you, there are so many choices in the tools you use to get your work done.

    There are so many choices that it’s almost overwhelming. That’s one of the reasons why I have this site. It helps you navigate choices and informs you about the various ways to accomplish a task.

  4.  Linux can be harder if you want.

    I know that I said Linux is easy up above and it is. However, you can choose to learn a whole lot more – and that information is freely available. You don’t have to learn a lot to use Linux, but you can learn as much as you want. If you decide that you want to, you can even learn enough programming to contribute to the kernel.

  5. Linux is open source.

    I’m not a zealot. I use all sorts of proprietary software. However, I appreciate that Linux is open source. This means things get fixed. If you report a bug, there’s a reasonable chance that the bug will be fixed. It needn’t be the developer that fixes it. Anyone with enough skill can fix bugs.

    Linus’s law is that “Given enough eyeballs, all bugs are shallow.” My experience tells me that this is reasonably true.

  6. Linux is reasonably secure.

    While Windows (and Apple) have certainly improved their security processes, Linux is reasonably secure when you first install it. Then, there are all sorts of things you can do to make it more secure.

    You have full multi-user permissions, meaning a user can only do what they’re permitted to do. You can enable things like SSH but then prevent brute force attacks. You can secure your account and your information. There are even advanced subjects like jails and other forms of sandboxing.

  7. Linux is free as in free beer.

    While I don’t mind paying for things, I get hundreds of choices about which operating system (distro) I use. Imagine if I had to pay a fee for each of the distros I’ve tried and used regularly. If I had to pay a licensing fee for each distro (and then each version of that distro), it’d be outlandish. I get all these choices for free.

    I still believe in supporting the projects I like and use, but I’m not obligated to pay for anything. AFAIK, even the enterprise distros tend to allow free use in one form or another. Man, imagine the costs if we had to pay for a license for all the distros and applications we use. I have more than 2500 packages installed and I haven’t been asked to pay for any of them.

  8. Linux has longevity.

    Once upon a time, you could have called Linux a hobbyist operating system. That’s not true anymore. From mobile phones to the very infrastructure that runs the internet, it’s a whole lot of Linux. While distros may come and go, Linux is going to live on for a long time. That means I won’t have to change. It means I can keep on using Linux.

    That’s a good thing. I appreciate stability. I don’t have to worry about some company taking over and taking Linux away from me. I’ll be able to use Linux, in one form or another, until the day I die.

  9. Linux is consistent.

    Yes, Linux has a whole lot of variation between the distros. One desktop environment may be completely different from another. You may have to learn those differences when you pick a different distro. Fortunately, for the most part, things are where you logically expect them to be.

    But, yes… Yes, Linux is consistent. Underneath that desktop environment is a group of applications that are either installed already or able to be installed. Those are the consistency I speak of. The fact that this site exists with the content it has is proof of this consistency – as so many of the articles apply to all the major distros. That’s the consistency I speak of.

  10. It’s not Windows.

    If there’s a task someone wants me to do online, such as have an online meeting, I can just tell them that I don’t use Windows. They may look at me strangely but I can honestly tell them that I don’t use Windows. Sure, I might be able to accomplish those things in Linux – but they’re tasks I don’t want to do. So, I don’t do them and tell them the truth.

    “I don’t know how to fix your Windows computer.” I can legitimately say this. I’m known to be a ‘computer guy’ and people will ask me questions about their broken systems. When I first moved here, I made the mistake of helping them. I shortly moved to Linux and no longer know anything about Windows. So, I no longer have to worry about fixing someone else’s computer. 

    And that is awesome.

So, there you have it. That’s my top 10 reasons why I use Linux. The reasons aren’t in any particular order, or anything like that. I just wrote them as I thought of them, though I did write a few down ahead of time. 

What’d I miss? What would you add to the list? 

Closure:

So, if you think writing this list was in some way easier, I’ll point out that this is one of the longest articles I’ve published. It’s not the longest, but it’s up there in length. I dare say that it might have been more effort than it was worth, but I had to try it. I doubt I’ll do many of these, but this one was kind of fun to write.

I’ve never done a listicle (list article) before and I’m not sure that it’s something I’ll adopt, though it is a good subject to get some feedback. Please, do provide that feedback – preferably here so it’s all in one location. Heck, you can let me know how much you don’t like listicles if that’s what you want to say about it. But, feel free to cover anything you think should have been on the list.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Install Flatpaks In Lubuntu

This shouldn’t be a very long article and will apply to other distros, but this is how you install Flatpaks in Lubuntu. This seems like a good article to write as it’s something tucked into my notes and something I’ve not written about before.

This article applies to Lubuntu. It may apply to other distros, especially those in the Lubuntu family. In some cases, such as Linux Mint, recent versions come with Flatpak support. In those cases, you don’t need to do anything special, you can start using Flatpaks as soon as you’d like.

What Are Flatpaks:

Flatpak is a utility for software deployment. It was once known as xdg-app but has used the Flatpak name for going on a decade. This is not something new, even though it has recently grown in popularity. They’re pretty handy.

The thing that makes Flatpaks special is that they run in a sandbox. That means they don’t interact with other software on your system, they run in their own isolated memory space. This is good for security.

They’re also good for easy installation. Not only do they run in an isolated environment, they are self-contained. With Flatpak being what it is, you don’t have to worry about dependencies.

If a Flatpak does need to integrate with the system, this will be set by the developer. The advanced user can change those permissions, though that may cause breakage should you restrict the access levels.

There’s also a central repository that you can use. While you can get a Flatpak from anywhere, and you can add your own repositories, the most common use will be from a central repository which does things like providing updates to the packaged software. 

This is good for developers who want to distribute their software while not having to do so for the various package managers. Rather than a .deb or .rpm version, they can upload and update a Flatpak that’s stored in a centralized repository.

Pretty neat!

Install Flatpaks In Lubuntu:

For the sake of this article, Flatpak is the software type and the delivery mechanism, while Flatpaks are the applications installed via Flatpak. Make sense? I hope so because that’s what I’ve got.

I should probably have mentioned that earlier in the article…

Anyhow, to install Flatpak you’ll need an open terminal. As you’re using Lubuntu, you can open your default terminal by pressing CTRL + ALT + T on your keyboard.

With your terminal now open, let’s install Flatpak so that you can install all the Flatpaks your heart desires. To do that, run this command to install Flatpak:

That will install Flatpak, but you will then want to enable the Flatpak repository. That’s another easy command that you can cut and paste:

Next, you’ll need to reboot. Yes, this one should have a reboot to work properly. Run this command in the terminal:

That’s all you need to do.

Installing Flatpaks:

Now you have enabled Flatpak and you’ve added the default Flatpak repository. You can head to the centralized repository and start browsing for interesting software. You do that here:

Flathub, the Flatpak Repository

I’ll give you an example, to make it easier…

Let’s say you want to install ONLYOFFICE as a Flatpak.

Well, you browse/search for it and end up at the ONLYOFFICE repo page.

Once you’re there, you’ll see an “Install” option in the upper right section of the page. There’s a down-arrow next to it, which is the easiest method. Click that and run the command prompt in your terminal.

In this case, that command prompt would be:

You can then run the application with this command:

No, you shouldn’t need to run the program through the terminal. Because you rebooted, added Flatpaks should appear in your application menu in the appropriate category section. 

Also, it’s a bit more of an interactive process when you’re installing Flatpaks through the terminal. You’ll be given a few options along the way, though I just accept the defaults (by pressing the Y key) and call it good.

You’ll also notice that the applications are much larger. If you have slower internet, you’ll notice this. This is because the Flatpaks are isolated and come with the required dependencies. Because of this, the packages are quite a bit larger.

Once in a while, I’ve noticed that the application won’t appear until a reboot happens. If you run the terminal command once, that seems to help it, and then appears in the application menu. It’s not perfect, at least not here, but it’s definitely ‘good enough’ and it’s a great way to get sandboxed software that doesn’t require hunting around for dependencies.

Closure:

So, that’s how you install Flatpaks in Lubuntu. It’s also probably how you install Flatpaks in ElementaryOS, Kubuntu, Xubuntu, etc… However, if you’re installing Flatpaks in Ubuntu there’s an extra step you can take that lets you integrate Flatpaks better with the GNOME desktop environment.

If you’re using Ubuntu, you can add this command before the reboot step:

I believe that will add Flatpaks to your regular software store, that is the GUI one where you’d go to add software. I’m not sure because I don’t use Ubuntu, but that’s what the command looks like it will do. I’d normally not share any code I haven’t used myself, but I took the command from Flatpak’s site, which makes me think it’s correct.

Anyhow, Flatpaks are easy to install and run more securely. If your OS changes underneath, this won’t matter. The software comes with the appropriate dependencies. Once you’re more familiar with the software, you can change the permissions if you want. I’ve yet to find a single reason why I’d want to modify the permissions – but it’s possible.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

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.