Skip to main content

Exploring Linux Terminal and Command-Line Tools

Even though I have used terminal based command-line tools before I have never had to go really deep into the program, so I would say this is totally a new thing for me and I feel excited!

Testing some of the Command-Line Tools

1. Zip and Unzip

At first I started by creating a new folder "Testikansio" and added there three files (Tiedosto1, Tiedosto2, Tiedosto3). These are the files I want to put in a one single zip file and I can do it with the following command:

zip Pakattu Tiedosto1 Tiedosto2 Tiedosto3

It tells the computer to create a zip file called "Pakattu" and copies the wanted files inside that new file. 
At this point I tested the unzip command unzip after deleting the original files. If there would be identically named files in the same folder Terminal would ask if the user wants to delete, rename or cancel the process. 

2. Seq

Seq is a mathematical tool that allows you to determine the wanted numbers inside a restricted area.
For example- the basic command seq 2 gives me all the numbers ending to 2 (1 and 2). 
There are also many ways to define the terms for the desired outcome.

seq -w --separator="||" 2 19 300
Prints all the numbers beginning from 2, spaced with 19, ending to 300. 

seq -f "%06g" 101 108
Prints all the numbers from 101 to 108 with additional zeros so the total length of each number is 6 units.

3. ImageMagick - Convert

Because I am a visual person and interested in photography I wanted to give a try to ImageMagick's Convert tool.

The command convert -resize 70% kukka.jpg kukka.gif creates a new picture from the file called kukka.jpg. The new file "kukka.gif" is 30% smaller than the original picture and also gets the new image format "gif".

Compering the converted file to the original.

I ended my experiment by adding the copyright information to my picture with following definitions;

convert kukka.gif -gravity southeast -stroke '#000C' -strokewidth 2 \ 
-annotate 0 '(c) Carola W' -stroke none -fill white \ 
-annotate 0 ' (c) Carola W' kukka.gif


Based on Linux course by Tero Karvinen (


Popular posts from this blog

Building Love-O-Meter by using a temperature sensor

This "Love-O-Meter" is based on the tutorial by Arduino and it comes with the starter kit. It uses a temperature sensor to measure the warmth of your skin and then starts to turn on (or off) the LEDs  indicated by the temperature.

The components Arduino UNOBreadboardJumper wiresLEDs220 ohm resistorsTMP36 temperature sensor

Building the Circuit
At first I ran the "Hello World" for Arduino to make sure the environment would work as expected. Now I could start to connect the jumper wires between Arduino UNO and the breadboard.

As usually I connected the breadboard to power (5V) and to the ground (GND). I inserted the TMP36 on the breadboard so the rounded part of the sensor would face away from Arduino.

I attached 3 LED lights and the resistors and connected them with Arduino. The lights should react to the heat of the finger and if the temperature would get hot enough all the lights would be on and would also tell you if you are a hot lover or not...

The result and the …

Creating a Bootable USB for Kali Linux

If you are interested to see my documentation about making a bootable USB for Xubuntu please click here!

This USB was made by using the latest version of Xubuntu (the 14.04 release).

Downloading Kali Linux 
23.13. After navigating to I chose the version that would suit me the best and started downloading the ISO image for 64-Bit system.

USB imaging
22.40. I followed the guide offered by and used the commandsudo fdisk -lwithout plugging the USB yet. I needed to pay attention to the path of Device Boot (/dev/sdb1). After this I inserted USB and ran the same command again. Now I could see how the name of Device Boot had changed to sdc1. This would be my USB to use.

22.50 It only took a while to format the dd code correctly as the base was already given on Kali's web page. After running the correct command for the first time I got an error message "'/dev/sdc1': Permission denied". In these kind of situations I tend to ask sudo for help an…

Using a button to control the LED light

This time my project was to configure how to build a button that would turn on and off depending if the user is pushing it or not. While holding the button down the LED should stay on until removing the finger.

For this assignment I used the fallowing components:
Arduino UNO and USBJumper wiresLED lightBreadboardButton10k ohm resistor
At first I run the "Hello World" for Arduino and made sure that the LED I was using worked properly (read my previous post).

I attached the button in the middle of the breadboard so the legs were touching the both "sides" of it.

Now I started to connect the jumper wires between the Arduino UNO and the breadboard. In order to get it working like in the sample code (Ardoino > Examples > 02.Digital > Button)
I linked the wires with Arduino's 5V (red wire, positive) and ground (black wire, negative) to the equal holes on the very corner of the breadboard (+ and -). I put the white jumper wire to connect the positive circuit to t…