Posted in databases, Unix, scripting

Unix – I did my best


Hi Boys and Girls!

After my previous Unix-related post some of you complained that it was too short, to little knowledge and more meh than wow. This time I decided to do my best and fulfill all your Unix desires ­čÖé

One of my biggest discoveries about Unix (and command line in general) is that

You have to know where your file is.

You have to know what is the path to the folder in which your file would be stored.

You have to know how to do things.

In order to know things – I’ve gathered bunch of tips and commands that might be useful. ­čÖé

At first – commands!

File management:

  • cat –┬áConcatenate and print files
  • chgrp –┬áChange the file group ownership
  • chmod –┬áChange the file modes/attributes/permissions
  • chown –┬áChange the file ownership
  • chattr – ┬áChange file attributes
  • cd ┬á – Change directory
  • cd – – Change to previous directory

(hint: cd without provided directory will take you back to home catalog – with the specified path will take you to that directory.

It is also possible to move up step by step or several parent directories at once, for example:

cd ../../../ ┬á – will move you 3 cataloges up)

  • df –┬áReport free disk space
  • echo –┬áWrite arguments to standard output
  • file – ┬áDetermine file type
  • find – ┬áFind files
  • gzip – Zip files
  • gunzip – Unzip files
  • ln┬á –┬áLink files
  • ls – List directory contents

(ls –color will list your files with selected color)

  • mkdir –┬áMake directories
  • more –┬áDisplay files on a page-by-page basis
  • mv –┬áMove or rename files

For examlpe – if you wanna rename test1 file into test45 – your command would be like this: ┬á┬ámv test1 test45

  • pwd –┬áprint working directory – Return working directory name
  • rcp – Transfer files to the remote host
  • rm – Remove files and catalogs
  • rmdir – Remove directories, if they are empty.
  • split –┬áSplit files into pieces
  • touch –┬áChange file access and modification times
  • umask –┬áGet or set the file mode creation mask
  • unlink –┬áCall the unlink function

File system management:

  • badblocks – badblocks control
  • df – Report free disk space
  • dd –┬áConvert and copy a file

Process management:

  • at –┬áExecute commands at a later time
  • cron – Regular process run during┬ágiven timeframe.
  • fg –┬áRun jobs in the foreground
  • kill –┬áTerminate or signal process.
  • killall –┬áTerminate or signal all processes with given name.

Sounds Metallica-ish, doesn’t it?

  • ps –┬áReport process status
  • watch – Monitor command result

(For the watch ­čśë )

  • nice –┬áInvoke a utility with an altered nice value

Users and systems management:

  • clear – Clear console / terminal
  • login – Log in to the system
  • passwd – Change password
  • su – Log into other user’s account
  • sudo – Run process with root rights
  • who –┬áDisplay who is on the system
  • whoami –┬áDisplay┬áwhat user are you currently using

Text editing:

  • cut –┬áCut out selected fields of each line of a file
  • grep –┬áSearch text for a pattern
  • head –┬áCopy the first part of files
  • more –┬áDisplay files on a page-by-page basis
  • vi –┬áScreen-oriented (visual) display editor

Comment time

People usually don’t know all Unix commands by heart – they collect the most useful ones in random txt file and use them (or use history command), believe me. To use Unix – you don’t have to know them all. Take it easy.

To manage your Unix account – you’ll need a login and password. Nice tool to manage Unix (or Linux) commands is Putty┬á(such fabulous UI design) – give it a try ­čÖé

Command line allows you to combine multiple commands and get precise results.

On the other hand, you may be thinking how Unix will be helpful in testing activities? In the same way as in development – you are able to manage your files quickly or run shell scripts. In addition, everyone is able go through the same logs, search for useful scripts, go inside them, look around and modify, if necessary.

You can also narrow down your search results, using grep, or make sure that the log you are looking for at the moment is the same one, which has been generated
a moment ago – not last month.

Furthermore, you are able to color your results, number the rows and save all modifications. All of that ┬á– using just pure commands – without GUI. Sounds strange – but it works – and, to be honest, a lot of people work this way.

One account – multiple users

There is a very important thing to remember when working on Unix account.

I did mention before – companies (projects) use Unix or Linux, because it is possible to work on the remote machine – even by multiple users at once. On the other hand, those users usually have rights to modify the same files. What dose it mean? You have to be precise and careful what you are doing.

I hope that my guide made you curious and you’ll experiment with Unix, Linux and command line. It is not as scary as you think.

Do you have any favorite commands? Did I miss something important?┬áDon’t be shy – you can comment down below.

Stalk me on Twitter (@KingaTest).


Posted in databases, Unix

Introduction to Unix

One day this unexpected situation comes.

This is Linux.

This is your console.

We use Unix.



It wasn’t that bad:) Fortunately, I’ve received a good companion to get familiar with Unix and not to drown. Let’s get to the point.

What is Unix


For those, who use Windows on daily basis it might be surprising. Sure we are aware that there is something more out there (like Mac ­čÖé ) but Unix? Linux, Unix, they are operation systems just like your beloved Windows ­čÖé

Traditionally, let’s start from Wikipedia’s definition:

Unix is a family of multitasking, multi user computer operating systems that derive from the original AT&T Unix, developed starting in the 1970s.

You may be familiar with Linux, Unix is a bit similar. They have common source and behave in a similar manner.

Linux is a pure Kernel – Unix consists of Kernel and some additional software. Linux is free – Unix – in most cases – is not ­čśŽ What is more, Linux, originated from a programmer’s toy – became a powerful tool for large machines. Unix though, starting from exclusive , expensive environments, nowadays is used on small PCs.

What you have to know – there are different types of Unixes. They are comparable, but not exactly the same. To talk to Unix you need to get familiar with any shell.

Why do we need them anyway?

We need Unix in order to work on remote desktops – or – to enable multiple users to use one space. What is more – each Linux/Unix enthusiast would tell you that it’s reliable. They won’t prompt you seven times if you REALLY REALLY wanna delete this file, but at the same time, they won’t run an update in the middle of conversation ­čÖé

Unix is a common “tool” used by large companies. It is very useful in working with databases.

You have to make some effort to get familiar with console and simple script languages, but if I was manage to do so – you’ll be able to to that for sure:)

In my next posts I would go a bit deeper into subject and move on with simple commands, that are useful for me in testing activities and managing files.

Here you can find more complex information about what Unix is.

As always – I recommend you to install it by your own and just play around. You could also get familiar with Unix with this simple course from Codeschool here (no, the don’t pay me, they just have awesome courses) .

Stalk me on Twitter. Enjoy. ­čÖé

Posted in databases, Uncategorized

After hours – it’s friday #pi─ůteczek


Hi bored IT guys and girls

You’ve been thinking – what to do on Friday? Check my after – hours Top10 IT song list­čÖé

Not always should you be as serious as everybody think you are.

Preparing that song-set made me fun. I was trying to choose the best known songs – but I encourage you to comment with your own ones. There is plenty on the internet. My list is subjective – because it’s mine!
My criteria: we all know it / they are funny/ people sing well/ they are creative.
Try with your own one – I’m challenging you:)


What do you think?

  1. The best known – the one and only – “And so you Code”

  2. Something exclusively for QAs – “Hello from QA”


  3. A song about benefits of live-patching – “Uptown Funk (remix)”


  4. And the one about SUSE love – “Can’t stop the SUSE”


  5. Code Monkey! – “Code Monkey”


  6. Exclusively for all #Javistas – “Java is life”

  7. Let’s pretend it’s a song – I love it :):):) “Java forever and ever”


    The best from Poland (I could provide you with the translations :)) :

  8. “Internety robi─Ö” – yes we do


  9. How to make a proper IT Conference commercial : “Programistok 2016” (yey!)


    10. That is hideous, but still funny! :D:D – “My Informatycy”


Hope you’ll enjoy all of them:) Cheers.

Posted in databases

SQL for dummies


…and when I say dummies – I’m thinking about myself a while ago.

As a tester – I was a complete ignorant when it comes to databases. At the beginning of my career path SQL wasn’t so needed┬áfor me. It appeared here and there, but we’ve never had a true romance. But then… suddenly… at a glimpse… love exploded┬á­čÖé

No, well, to be honest, I just decided to stop being dummy and put myself together. And I- Kinga Witko – learned it by heart and – basically – by myself. How did I do that?

Today I’ll give you some useful tips, that might help all SQL beginners to start┬átheir database adventure. If I managed to learn it – why couldn’t you?

Where should I start?

Most of you probably know that the one and only knowledge source is W3Schools website. SQL course is there as well. It is vast, full of examples and great┬áexercises. The whole necessary knowledge is there, but for me – it wasn’t enough and I lack some structure in that course.

Level up

Some time ago I started to get familiar with CodeShool. They have awesome online courses – each of them – which is basically adorable – has A SONG(!) about the language you’re learning. There is a song about SQL too :).

Their online course is divided into to parts: one of them is free -for the other one – ‘The Sequel to SQL’ – you have to pay a few $, but it’s worth it. Not only the knowledge is structured, but also supported with great examples and opportunity to go deeper into SQL.

That was it – nitty gritty online course. It was also just the beginning.

After the CodeSchool course I was familiar with SQL enough to get back to W3Schools and practice more. But it still wasn’t enough. I wanted to have some ┬áreal database to make and brake (in worst case scenario).

How to practice?

I was recommended to install a free database named PostgreSQL. It is easy to install and really great. When you go through setting up your own database, tables and so on, you’ll eventually learn a lot. Believe me.

If you’re a ‘mobile’ person like I am – I would also recommend you a great Android app (not very pretty, but valuable) – LearnSQL. I was going through several free Android applications for SQL learning and this one was the best. Well done, chaps!

Where to find correct queries?

Try this website. It’s about SQLite, but the whole queries stuff is represented by simple graphics and allows you to learn more and to get familiar with all useful possibilities that SQL gives you.

So – your mission for today. Stop being dummy as I was and learn SQL. It is not as hard as you might think. Good luck!

Should you find other great SQL learning-related online stuff please let me know ­čÖé