If you’re like most people, you probably delete files less than a minute after they’re created. But if you’re using Linux, there’s a way to delete files much faster - and it’s easy to do even if you don’t have a lot of disk space. To delete a file, open the file’s Properties window and click the Delete button. The file will be deleted immediately, without any warning or progress indicator. If the deletion is successful, the file will be removed from your system and any associated directories will be emptied as well. If the deletion fails, you’ll see an error message that explains why the file couldn’t be deleted. If you want to try this method on a larger file - say, one that takes up several hundred megabytes - first create a smaller directory inside which to store the files and then copy all of the files into that directory. After copying all of the files into the new directory, open the Properties window for each of those new directories and click Delete on their properties pages.


Say you just ran some script that was supposed to move files around or download stuff, or anything else that involves files, and then you realize that you need to figure out what files just got created and where. And maybe you need to delete them.

First you’ll want to use the find command to figure out what files were created, and then using the mmin argument to specify files less than x minutes. If you want to specify only files, you can use the -type f argument to only check for files.

So if you want to check in the current folder, including subfolders, for files created in the last 5 minutes, you can use the following command:

To delete files we can use the -exec rm {} ; argument, which is a little confusing, but basically you’re telling the exec argument to remove the files.

So to delete all files in the current folder, including subfolders, created in the last 5 minutes, use this command:

If you wanted to specify files older than X days instead, you could use the -mtime argument — for instance, this command would delete files older than 10 days:

Much easier than looking at the man page.