Download or upload a file over SSH

#Copy something from this system to some other system: $> scp /path/to/local/file username@hostname:/path/to/remote/file   #Copy something from some system to some other system: $> scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file   #Copy something from another system to this system: $> scp username@hostname:/path/to/remote/file /path/to/local/file You can add a port with the -P param You can do it recursive with […]

Linux – Convert CR2 to JPG / PNG / etc.

To convert images taken from an Canon EOS 600D in CR2 format to the jpg format you need to install the ufraw package. $> sudo ​apt-get install ufraw After that you can navigate to the folder that contains the cr2-files and run the following bash script: $> for i in *.CR2; do ufraw-batch $i –out-type=jpeg […]

Linux – Add or edit DNS-server

In most Linux distribution the nameservers are stored in the file /etc/resolv.conf So you can edit it via: $> sudo nano /etc/resolv.conf You will see something like that: nameserver 192.168.88.1 nameserver 0.0.0.0 As you can see all nameserver entries follow the pattern: nameserver IPADRESS When searching for an DNS-Server the list is processed top down. […]

Create a SSH key with 1024 Bit encryption

To generate a 1024 Bit encrypted SSH key you can use the following command: $> ssh-keygen -b 1024 -t rsa Normally the key is saved in ~/.ssh/id_rsa together with the corresponding public key (~/.ssh/id_rsa.pub). Attention: Make sure you can remember the paraphrase later on if you entered one.

Compress and extract files

With tar On Unix based plattforms you can use the tar command for file compression and also for later uncompression. Compression $> tar -pczf web.tar.gz web/ With -h as the first parameter the real files instead symbolic links are compressed. So you can tar symbolic link targets. To exclude files or folder, you can define –exclude=’fileOFolderPath’ directly […]