Categories
MAC

MAC OS X – Renaming Multiply Filenames to Lowercase in a Directory

You will need the Terminal for this operation.
Open Terminal and navigate to the directory using the cd command where you want to change the case of the files.
Then run the following command:

for FILE in `ls -A1 *`; do FILENAME=`echo ${FILE} | sed 's/ /\\ /g'`; echo mv ${FILENAME} `echo ${FILENAME} | tr [A-Z] [a-z]`; done

If the output looks good remove the echo string before the mv command.

Please note that this command will fail on file names containing space characters.

 

Categories
MAC

MAC OS X – SSH LC_CTYPE Warning

Using terminal ssh to my Linux servers I have always got the following error:

 warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

Commenting the following line from /etc/ssh_config file on my Mac was the solution for me:

#   SendEnv LANG LC_*

Note: do not forget to use sudo when editing with in terminal like:

$sudo nano /etc/ssh_config
Categories
MAC

MAC OS X – Copy and Paste as Text

Well, well. I have my new Mac workstation and let me say there are many differences to Windows. But let me say it is much more better.

While I was writing my letter I would like to copy a text from one of my website admin page and it pasted the style also. So I was really curious that is it possible to copy and paste as text. And of course yes it is possible.

You can use

⇧⌥⌘V

to paste text without formatting.