Tar Files Explained

In UNIX, tar files are often used as a form a file archival. Such archives have different uses like: backups, migrations, installations, versioning, etc… Often you will hear the term Tarball, which simply means a tar archive.

Tar simple means Tape ARchive, this was originally developed in 1979 as a solution to archive to tape. The utility as then evolved into a standard archival utility.

By itself Tar does not provide any form of checksum to assure that the files originally are the same as the one inserted in the Tar Ball. In order to Continue reading “Tar Files Explained”

Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 2)

Ok, after the long part 1, we continue our journey with Standard Input or STDIN. Following the concepts we discussed in part 1, we know that STDIN has a standard file descriptor of 0. In other words, every process created by the kernel in UNIX, has file descriptor 0 assigned to STDIN.

STDIN is the way a process or a command reads the provided input to perform some action, to then, produce STDOUT, STDERR, or sometimes nothing (In UNIX nothing often means success). Continue reading “Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 2)”

Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 1)

For a lot of people, STDIN (standard input), STDOUT (standard output), and STDERR (standard error) are one of the most confusing subjects. Hopefully, in this post, I can explain once and for all the concepts.

In UNIX you might have heard people mention that everything is a file. Well that is close to correct. I would say that in UNIX everything is defines around file descriptors or FD.

A file descriptor or FD, is a unique identifier referred to as a handle, which identifies a file, an input/output resource, network resource, etc. It is normally a positive number that starts from 0 zero. In UNIX, every process gets, at the very least, 3 file descriptors: Continue reading “Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 1)”

UNIX vs. Windows End-of-Line Mistery

Time to discuss the infamous end-of-line in UNIX like systems vs. Windows systems. Just in case you do not know what end-of-line is. End of line character is the character that tells the system that the line of the file ends. For example, when you write a text file using a text editor, you may write something like:

This is the first line of the text file
This is the second line of the text file

When editing the file, to indicate to the system that the line is finished, you would press the ‘Enter’ key. Continue reading “UNIX vs. Windows End-of-Line Mistery”

The UNIX Mount Point

You have probably heard the term “mount-point” and wondered, or maybe not. You know it’s there, and files are in it, but you don’t know what it is? If this is the case then read this article…

I am assuming that you know what a file and/or a directory is, a directory is also called a folder. Well, a mount-point is simply the directory or file for which e device, normally a disk, either local or remote, is exposed to the system for interaction. Let’s take a common Linux system for example, this particular system is a CentOS, but it should not matter which system or UNIX type it is. Continue reading “The UNIX Mount Point”

The Shebang

As the first article, I decided to discuss the “Shebang“, also called many different ways: sha-bang, hashbang, pound-bang, or hash-pling.

In the UNIX world, there are scripts, in Linux for example, you will find a lot of “bash” scripts, when you edit one of these scripts there is a line at the top of the script, which looks something like:

#!/bin/bash

Continue reading “The Shebang”