This article will show how to create symbolic link and how to unlink it. Symbolic link also know as symlink or soft link is a special type of file which contains a reference to another file or directory in the form of relative or absolute path and act as pointer to other file.
Many scripts, require input from the user, or give output to the user as the script is running. This article describe how to pass arguments to script and make it non interactively, when we already know answers and we want to go thru script faster. Continue reading
This article describe simpler shorter way how to safe time when you need very often make and open directory. Continue reading
As a administrators we often use commands with options and arguments which are too long and we have to user them on regular basis. For that we can use alias which will help us type shorter commands. This article will describe How to set alias in linux.
If is needed to execute command or script on a remote UNIX based machine using ssh program is the best way how to do it. Ssh provides secure encrypted communications between two untrusted hosts over an insecure network.
less is part of the GNU project and is free software. It is a program similar to more, but which allows backward movement in the file as well as forward movement. Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi. Less uses termcap (or terminfo on some systems), so it can run on a variety of terminals.
Rsync is free file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. Rsync finds files that need to be transferred using a quick check that have changed in size or in last-modified time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file’s data does not need to be updated.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Screen is usually used when we do work which cannot be terminated. For example when is system patched remotely on unstable network, all work can be destroyed during network failure, in this case, screen is very good solution. Screen session will be running, even my ssh connection will be terminated by network. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would.
This topic will show you, how easy we can setup ssh between two systems that we will not need to write password anymore during log in to system. In this case we have user testuser and two servers system1 and system2.
In first step we need to generate ssh key pair, for which we use command ssh-keygen. Note, command for generating ssh keys will ask us for passphrase, this could be empty.
1. at first basic check by one command
In output we can see utilization of memory and and swap. we can change output with -b bytes -k kilobytes instead of -m megabytes. Option -t is used for showing memory with swap (-t as total).
# free -tm total used free shared buffers cached Mem: 128393 82606 45787 0 9873 40943 -/+ buffers/cache: 31789 96604 Swap: 34815 4773 30042 Total: 163209 87379 75830 #
If we are not satisfied with this output we can be more detailed by next scripts.