Suse & OpenSuse : Tips, Tricks, Tutorials, How Tos and Troubleshooting

Automatically dating your tar backups

Normally, we use the tar command coupled with some compression program such as gzip to create a backup of our directories. I.e. # tar -cf /var/log/backup/tux.tar /home/tux to backup the home directory of the user tux into the directory  /var/log/backup.

Short and quick tutorial for the command “touch”

The touch command is typically used for 2 purposes, to create a new file and to modify the access and modification times of the file.  If the file already exist, it will update the  both the access and modification times of the file and if it does not exist, it will create a new file.  [...]

Using command output with backquotes

The backquote (`), which is quite alien to most Windows users, is the key just below the top left hand side ESC key on your keyboard.  This is a useful key to use when you want to use the standard output of a UNIX/LINUX command as part of another command.

Using redirections: 2>&1 (Part 2 of 2)

If you go through enough shell scripts, you will notice the frequent use of 2>&1.  What does it mean and how it works? We have briefly introduced standard in (stdin) and standard out (stdout).  In the command line interface and also in shell programming, these are represented as follows: 0 Standard In (STDIN) 1 Standard [...]

Using redirections; <, >, >> (Part 1 of 2)

Redirections can be sometimes confusing to learn and utilize effectively.  We will try to explain it in the simplest possible way that we think is effective.  Please feel free to suggests a better approach to explaining it. Firstly, the 3 basic redirections. < ; this less than symbol is to instruct the shell to read [...]