Change uppercase filenames to lowercase
I needed to rename a handful of image files from my iPhone from all uppercase letters to lowercase. I did this in a bash shell in Fedora linux. Here's how I did it:
[dacaprice@fedora10]$ for i in `ls *JPG` do mv $i `echo $i | tr '[:upper:]' '[:lower:]'` done
How to run fsck on a Logical Volume in Linux.
I recently had a problem on my laptop running Fedora 11 where my X session just totally froze when trying to bring the laptop back from a hibernate state. Outside of the occasional issues coming out of hibernate (usually X not restoring) I'd say Fedora 11 has been pretty solid. This particular time, my X session restored but everything locked up. I tried switching to another virtual terminal to log in and kill GDM but some sort of inode error just streamed down the console. My only option was a hard reboot and after that I couldn't boot Fedora with any kernel. To fix my problem I booted off the Fedora install CD into rescue mode without mounting / . I then performed the following:
# lvm pvscan # lvm vgscan # lvm lvchange -ay /dev/VolGroup00/LogVol_home # lvm lvscan # fsck -yfv /dev/VolGroup00/LogVol_home
What is the “total” in ls -l ?
Today I had a bit of a brain fart. I might run 'ls -l' in my terminal 100 times a day and today I'm looking the output and asked what is that "total" actually mean?
[dacaprice@fedora10 ~]$ ls -l
total 54752
drwxrwxr-x 2 dacaprice dacaprice 4096 2009-06-02 22:26 bin
-rwxr-xr-x 1 dacaprice dacaprice 291106 2007-12-13 21:03 a.html
Straight from gnu.org, "for each directory that is listed, preface the files with a line `total blocks', where blocks is the total disk allocation for all files in that directory."