Archive for the ‘Linux’ Category

Disk management in Linux

Tuesday, April 20th, 2010

If you need to manage your disk or just check the disk space usage of a Linux powered computer, here are some suggestions for both graphical and command line interfaces. Desktop applications for disk management: File mangers: in a modern Linux desktop environment checking disk usage is a trivial task. The file ...

CLI search and replace in multiple files

Thursday, March 11th, 2010

Here is a quick tip about how to find and replace a text in multiple files, from CLI. In this example you have some text files (.txt) with urls like "http://example.com, http://another-example.com...". What you are trying to do is to replace all "http" references with "https". You can find all text files ...

Midnight Commander preserve saved settings

Thursday, December 3rd, 2009

After installing Ubuntu 9.10 (Karmic Koala) I have noticed that Midnight Commander, one of the most used CLI file managers available for Linux is unable to preserve settings over different sessions. The solution is quite simple: in order to save it's settings, Midnight Commander requires a ".mc" folder (notice the ...

Find all folders with same name in a directory tree and execute commands on them

Sunday, October 11th, 2009

In a Linux CLI environment you can use the "find" command to search for files or folder. In this tutorial I will explain how to find folders having the same name in a directory tree and execute commands on them. Since the best way to learn is by example, let's consider ...

PHP CLI increase memory limit

Saturday, October 3rd, 2009

When running a PHP script from command line interface (CLI), a higher memory limit may be required in order for the script to be successfully executed. This can be achieved using the "-d" or "--define" option in the command. According to the manual: This option allows you to set a custom ...