Find duplicate copies of files October 8, 2005
Posted by Carthik in applications, ubuntu.77 comments
fdupes is a command-line program for finding duplicate files within specified directories.
I have quite a few mp3s and ebooks and I suspected that at least a few of them were copies – you know – as your collection grows by leaps and bounds, thanks to friends, it becomes difficult to individually check each file to see if it is already there on your computer. So I started looking for a script that checks for duplicate files in an intelligent fashion. I didn’t find the script but I did find fdupes.
fdupes calculates the md5 hash of the files to compare them, and since each file will have a unique hash, the program identifies duplicates correctly. I let it run in the directory which contains my files recursively (which makes it check for duplicates across different directories within the specified directory, and saved the output to a file by doing:
$fdupes -r ./stuff > dupes.txt
Then, deleting the duplicates was as easy as checking dupes.txt and deleting the offending directories. fdupes also can prompt you to delete the duplicates as you go along, but I had way too many files, and wanted to do the deleting at my own pace. The deletion function is useful if you are only checking for duplicates in a given directory with a few files in it.
Memory, Swap Management October 7, 2005
Posted by Carthik in commands, ubuntu.30 comments
A lot of Linux newbies, myself included are often astonished at the amount (%) of memory used by Linux as opposed to, say, Windows on comparable systems. If you look at the System Monitor (Applications -> System Tools -> System Monitor), you can find the amount of memory used by your system. If you leave your computer on for a long period (say more than a day) then the memory usage seems to keep going up. This is a “good thing”. Let me explain why.
Linux actively uses free available memory to improve your system’s performance. Let’s say you have 1 GB of main memory (don’t we all wish!). Now, suppose all the programs you are running together require only 200 MB of memory. What happens to the other 800 MB of the available memory?
On a linux system, the memory is used to “cache” data that is used by the CPU. The idea behind caching is that it takes longer for your CPU to access data on the hard drive than it does to access data that is present in the main memory. So caching using the main memory effectively speeds up the system. On a windows system, there is no such optimization, so free memory is wasted as it does not get used.
Now when an application really needs all the memory that is used for caching, Linux pops out the cached data and makes the required memory available. As a last option, if all of the main memory is used up, then the memory you set aside in your swap partition is used too.
Try the command:
$free -m
to see what your memory usage is. The first line of results is fairly obvious. The second line tells you what the applications “see”, and should tell you how much memory is actually being used by the applications themselves.
Another used command is “top” which gives you a look at the memory/cpu usage and other details about the processes that are running on your computer – all at the terminal. I much prefer it to the GUI-based System Monitor myself.
Knowing that all the memory I paid for is being used to the max makes me feel all warm and fuzzy. For a moment earlier today, I thought there was something wrong, since almost all of my memory was being used, and I was hardly running anything intensive – now I am at ease – there was something wrong earlier, when the memory was not being used by Windows – now I know!!
Bug #1 October 6, 2005
Posted by Carthik in ubuntu.5 comments
Microsoft has a majority market share in the new desktop PC marketplace. This is a bug, which Ubuntu is designed to fix.
Ever wondered what the first Ubuntu bug is?
I like an Operating System with a sense of humor.
Mark Shuttleworth on Ubuntu October 5, 2005
Posted by Carthik in news, ubuntu.8 comments
Our Self-Appointed Benevolent Dictator for Life (sabdfl), Mark Shuttleworth, tries to clear some of the fog around the “Is Ubuntu a Debian derivative or fork?” issue by answering a few questions.
In fact, the questions include things like why ubuntu’s default theme color is brown, how they came up with “Warty Warthog” as a name, and how they picked the Ubuntu name, even. So go ahead and have fun reading Mark’s Why and Whither for Ubuntu.






