gnu/linux

Shell script to rename to lowercase files and directories

GNU/Linux

In the GNU/Linux world, it is common to use lowercase characters to identify files and directories, to illustrate the above we show the DIRs that are found under the /etc/apache2 DIR on Debian GNU/Linux

/etc/apache2/
├── conf-available
├── conf-enabled
├── mods-available
├── mods-enabled
├── sites-available
└── sites-enabled

so if you have one or several DIRs in uppercase or lowercase and uppercase at the same time and for uniformity want to all be lowercase then you can rely on the following script.

[githubget repo=1]sysadmin/shscript/tolower.sh[/githubget]

To use the script download here

Set execute permissions
chmod a+x tolower.sh
Run the script
./tolower.sh nombre-del-fichero

Further readings

  • man find
  • man tr

Shell script to rename to lowercase files and directories Read More »

Handle NTFS partitions in GNU/Linux

To handle NTFS partitions in GNU/Linux you should install the package ntfs-3g

Note: From April 2011 the ntfs-3g and ntfsprogs projects joined forces so now everything is in a single suite: ntfs-3g.

Most likely your distribution may already have installed the suite ntfs-3g else you can do it by exec

Debian/Ubuntu

$ sudo apt-get install ntfs-3g

CentOS/Fedora/RHEL

# yum install ntfs-3g

Handle NTFS partitions in GNU/Linux Read More »

Convert url to lower case using Apache HTTP

If your site respond to urls that contain uppercase and lowercase characters (the same page responds to urls: yourdomain.com/my-Url, yourdomain.com/my-url), taking into account SEO parameters that is not good since the search engines are case-sensitive so you'd have more than one page indexed with the same content. A trick you can use is to convert all urls to lowercase, so:

Convert url to lower case using Apache HTTP Read More »