Joaquin Peralta

My Personal weblog.

Delete the *~ temp files.

Some times after of work editing a lot of files, we have files with the famous extension ~ at the end, so if you want delete this files you only need type rm *~, however if push ~ very soft you have the risk of delete all files rm *. For this reason i make a script for search and move/remove this type of files.

This script without arguments move all files found and move to .Trash/ directory in a new compress file with date and hour. If yout execute this script with -y argument the files are deleted inmediatly.
For see this script continue …

Read more »

September 26, 2006 Posted by jperalta | GNU/Linux | | No Comments Yet

Convert a lot of pictures.

In many cases, when you copy your pictures from a Digital-Camera, this are saved as a DSCNXXXX.JPG file, however work with this pictures in html pages for example is very hard.

I recommend that you use a script for convert all this pictures in a mini-sample for put for example in a web-page.
Read more »

September 17, 2006 Posted by jperalta | GNU/Linux | | 2 Comments

Login without password

1.-Go to yout private .ssh directory :
cd ~/.ssh

If the directory does not exist yet, just create it with : mkdir ~/.ssh ; chmod g-w ~/.ssh

If the directory .ssh exist already make sure you do not have group write acces privledges or this wont work.

2.- Generate a private/public identity key pair with : ssh-keygen -d

Hit return (2 times) when asked for a password. This gives you 2 new files ‘id_dsa‘ and ‘id_dsa.pub‘.

3.- Take the latter file (id_dsa.pub) and copy it in the ~/.ssh directory under the name authorized_keys : cp id_dsa.pub authorized_keys2

4.- Copy the contents of .ssh into the .ssh directory on all the machines for your user within your network.

5.- From each machine try log into all other machines-you should be able to do so without a password prompt : ssh machine_name.

JP.

September 6, 2006 Posted by jperalta | GNU/Linux | | No Comments Yet