How to Find Duplicate Files in Linux and Remove Them

By Ambarish Kumar

Find and Remove Duplicate files in Linux

Brief: FSlint is a great GUI tool to find duplicate files in Linux and remove them. FDUPES also find the files with same name in Linux but in the command line way.

If you have this habit of downloading everything from the web like me, you will end up having multiple duplicate files. Most often, I can find the same songs or a bunch of images in different directories or end up backing up some files at two different places. It’s a pain locating these duplicate files manually and deleting them to recover the disk space.

If you want to save yourself from this pain, there are various Linux applications that will help you in locating these duplicate files and removing them. In this article, we will cover how you can find and remove these files in Ubuntu.

Note: You should know what you are doing. If you are using a new tool, it’s always better to try it in a virtual directory structure to figure out what it does before taking it to root or home folder. Also, it’s always better to backup your Linux system!

FSlint: GUI tool to find and remove duplicate files

FSlint helps you search and remove duplicate files, empty directories or files with incorrect names. It has a command-line as well as GUI mode with a set of tools to perform a variety of tasks.

To install FSlint, type the below command in Terminal.

sudo apt install fslint

Open FSlint from the Dash search.

Use FSlint tool find duplicate files in Linux
FSlint dashboard

FSlint includes a number of options to choose from. There are options to find duplicate files, installed packages, bad names, name clashes, temp files, empty directories etc. Choose the Search Path and the task which you want to perform from the left panel and click on Find to locate the files. Once done, you can select the files you want to remove and Delete it.

You can click on any file directory from the search result to open it if you are not sure and want to double check it before deleting it.

You can select Advanced search parameters where you can define rules to exclude certain file types or exclude directories which you don’t want to search.

FDUPES: CLI tool to find and remove duplicate files

FDUPES is a command line utility to find and remove duplicate files in Linux. It can list out the duplicate files in a particular folder or recursively within a folder. It asks which file to preserve before deletion and the noprompt option lets you delete all the duplicate files keeping the first one without asking you.

Installation on Debian / Ubuntu

sudo apt install fdupes

Installation on Fedora

dnf install fdupes

Once installed, you can search duplicate files using the below command:

fdupes /path/to/folder

For recursively searching within a folder, use -r option

fdupes -r /home

This will only list the duplicate files and do not delete them by itself. You can manually delete the duplicate files or use -d option to delete them.

fdupes -d /path/to/folder

This won’t delete anything on its own but will display all the duplicate files and gives you an option to either delete files one by one or select a range to delete it. If you want to delete all files without asking and preserving the first one, you can use the noprompt -N option.

fdupes command line tool to find duplicate files in Ubuntu Linux
FDUPES: finding and removing duplicate files

In the above screenshot, you can see the -d command showing all the duplicate files within the folder and asking you to select the file which you want to preserve.

Final Words

There are many other ways and tools to find and delete duplicate files in Linux. Personally, I prefer the FDUPES command line tool; it’s simple and takes no resources.

How do you deal with the finding and removing duplicate files in your Linux system? Do tell us in the comment section.

From: It’s FOSS

How to Find Duplicate Files in Linux and Remove Them

By Ambarish Kumar

Find and Remove Duplicate files in Linux

Brief: FSlint is a great GUI tool to find duplicate files in Linux and remove them. FDUPES also find the files with same name in Linux but in the command line way.

If you have this habit of downloading everything from the web like me, you will end up having multiple duplicate files. Most often, I can find the same songs or a bunch of images in different directories or end up backing up some files at two different places. It’s a pain locating these duplicate files manually and deleting them to recover the disk space.

If you want to save yourself from this pain, there are various Linux applications that will help you in locating these duplicate files and removing them. In this article, we will cover how you can find and remove these files in Ubuntu.

Note: You should know what you are doing. If you are using a new tool, it’s always better to try it in a virtual directory structure to figure out what it does before taking it to root or home folder. Also, it’s always better to backup your Linux system!

FSlint: GUI tool to find and remove duplicate files

FSlint helps you search and remove duplicate files, empty directories or files with incorrect names. It has a command-line as well as GUI mode with a set of tools to perform a variety of tasks.

To install FSlint, type the below command in Terminal.

sudo apt install fslint

Open FSlint from the Dash search.

Use FSlint tool find duplicate files in Linux
FSlint dashboard

FSlint includes a number of options to choose from. There are options to find duplicate files, installed packages, bad names, name clashes, temp files, empty directories etc. Choose the Search Path and the task which you want to perform from the left panel and click on Find to locate the files. Once done, you can select the files you want to remove and Delete it.

You can click on any file directory from the search result to open it if you are not sure and want to double check it before deleting it.

You can select Advanced search parameters where you can define rules to exclude certain file types or exclude directories which you don’t want to search.

FDUPES: CLI tool to find and remove duplicate files

FDUPES is a command line utility to find and remove duplicate files in Linux. It can list out the duplicate files in a particular folder or recursively within a folder. It asks which file to preserve before deletion and the noprompt option lets you delete all the duplicate files keeping the first one without asking you.

Installation on Debian / Ubuntu

sudo apt install fdupes

Installation on Fedora

dnf install fdupes

Once installed, you can search duplicate files using the below command:

fdupes /path/to/folder

For recursively searching within a folder, use -r option

fdupes -r /home

This will only list the duplicate files and do not delete them by itself. You can manually delete the duplicate files or use -d option to delete them.

fdupes -d /path/to/folder

This won’t delete anything on its own but will display all the duplicate files and gives you an option to either delete files one by one or select a range to delete it. If you want to delete all files without asking and preserving the first one, you can use the noprompt -N option.

fdupes command line tool to find duplicate files in Ubuntu Linux
FDUPES: finding and removing duplicate files

In the above screenshot, you can see the -d command showing all the duplicate files within the folder and asking you to select the file which you want to preserve.

Final Words

There are many other ways and tools to find and delete duplicate files in Linux. Personally, I prefer the FDUPES command line tool; it’s simple and takes no resources.

How do you deal with the finding and removing duplicate files in your Linux system? Do tell us in the comment section.

From: It’s FOSS

Easily Monitor CPU Utilization in Linux Terminal With Stress Terminal UI

By Munif Tanjim

s-tui Interface

Brief: Monitoring CPU utilization in Linux becomes a bit better with Stress Terminal UI.

For us terminal lovers, more the terminal tools the better. I’ve covered a number of terminal tools before, including music player, file browser etc. And today, I’m here with a monitoring tool that can visualize various parameters of your CPU inside your terminal.

I know that we have covered CoreFreq CPU Utilization tool in the past but that tool was meant for advanced users. Stress Terminal UI is a relatively a lot easier to use and comprehend.

Stress Terminal UI for CPU monitoring in Linux

Stress Terminal UI (or in short, s-tui) is CPU monitoring tool that runs entirely within your terminal. It is written in Python and developed by Alex Manuskin. Let’s take a look first:

s-tui Interface

It has a visually pleasant and clean interface. If you want a smooth graph plotting, you can check the relevant options.

Features

Stress Terminal UI offers the following features:

  • Visualize CPU Frequency, Utilization, Temperature & Power Usage
  • Displays performance dips caused by thermal throttling
  • Lightweight & uses minimal resources
  • Requires no display server (i.e. X-server for most Linux distros)
  • Stress Operation mode for stress testing the CPU

You can hide specific sections if you don’t need them. Here’s how it looks with smooth graph plotting and only Frequency & Power Usage sections enabled:

s-tui with CPU Frequency & Power Usage
s-tui with CPU Frequency & Power Usage

s-tui also supports stress testing your CPU. It uses the stress command-line tool in the background for stressing the CPU. If you select the Stress Operation mode, you will notice that all the graphs will hit their max values:

s-tui Stress Operation mode
s-tui Stress Operation mode

You can also tweak the stress testing parameters from the Stress Options:

s-tui Stress Options
s-tui Stress Options

s-tui also displays the CPU information in textual form in the bottom:

s-tui CPU Information
s-tui CPU Information

If you want to observe various CPU parameters of you computer Stress Terminal UI is a really nice tool. Specially it will be helpful if you want to monitor your remote systems or VPS.

However, s-tui doesn’t show specific information about the processes running on the system, it just visualizes the overall situation. So, if you want a tool that reports information about individual processes or want to manage those processes, s-tui can’t really help you with that.

Installation on Ubuntu and other Linux distributions

For installing s-tui, you will need a Python environment set up on your system and the pip command has to be available.

Now, run the following command for installing it:

pip install s-tui --user

If you want to install it system-wide, you will have to run pip with sudo:

sudo pip install s-tui

That is enough for installing s-tui.

But if you want to use the Stress Operation mode, you will also have to install stress on your system. It’s just a simple apt command away:

sudo apt install stress

Now, you are up and ready for using s-tui on your system. If you find any bug you can report it on their GitHub page:

Stress-Terminal UI


What do you think about s-tui? Is it something you would use for CPU monitoring in Linux? Do you use some other tool to monitor CPU utilization?

From: It’s FOSS

Easily Monitor CPU Utilization in Linux Terminal With Stress Terminal UI

By Munif Tanjim

s-tui Interface

Brief: Monitoring CPU utilization in Linux becomes a bit better with Stress Terminal UI.

For us terminal lovers, more the terminal tools the better. I’ve covered a number of terminal tools before, including music player, file browser etc. And today, I’m here with a monitoring tool that can visualize various parameters of your CPU inside your terminal.

I know that we have covered CoreFreq CPU Utilization tool in the past but that tool was meant for advanced users. Stress Terminal UI is a relatively a lot easier to use and comprehend.

Stress Terminal UI for CPU monitoring in Linux

Stress Terminal UI (or in short, s-tui) is CPU monitoring tool that runs entirely within your terminal. It is written in Python and developed by Alex Manuskin. Let’s take a look first:

s-tui Interface

It has a visually pleasant and clean interface. If you want a smooth graph plotting, you can check the relevant options.

Features

Stress Terminal UI offers the following features:

  • Visualize CPU Frequency, Utilization, Temperature & Power Usage
  • Displays performance dips caused by thermal throttling
  • Lightweight & uses minimal resources
  • Requires no display server (i.e. X-server for most Linux distros)
  • Stress Operation mode for stress testing the CPU

You can hide specific sections if you don’t need them. Here’s how it looks with smooth graph plotting and only Frequency & Power Usage sections enabled:

s-tui with CPU Frequency & Power Usage
s-tui with CPU Frequency & Power Usage

s-tui also supports stress testing your CPU. It uses the stress command-line tool in the background for stressing the CPU. If you select the Stress Operation mode, you will notice that all the graphs will hit their max values:

s-tui Stress Operation mode
s-tui Stress Operation mode

You can also tweak the stress testing parameters from the Stress Options:

s-tui Stress Options
s-tui Stress Options

s-tui also displays the CPU information in textual form in the bottom:

s-tui CPU Information
s-tui CPU Information

If you want to observe various CPU parameters of you computer Stress Terminal UI is a really nice tool. Specially it will be helpful if you want to monitor your remote systems or VPS.

However, s-tui doesn’t show specific information about the processes running on the system, it just visualizes the overall situation. So, if you want a tool that reports information about individual processes or want to manage those processes, s-tui can’t really help you with that.

Installation on Ubuntu and other Linux distributions

For installing s-tui, you will need a Python environment set up on your system and the pip command has to be available.

Now, run the following command for installing it:

pip install s-tui --user

If you want to install it system-wide, you will have to run pip with sudo:

sudo pip install s-tui

That is enough for installing s-tui.

But if you want to use the Stress Operation mode, you will also have to install stress on your system. It’s just a simple apt command away:

sudo apt install stress

Now, you are up and ready for using s-tui on your system. If you find any bug you can report it on their GitHub page:

Stress-Terminal UI


What do you think about s-tui? Is it something you would use for CPU monitoring in Linux? Do you use some other tool to monitor CPU utilization?

From: It’s FOSS