This article describe simpler shorter way how to safe time when you need very often make and open directory. Continue reading
Finding CPU and memory utilization is one of the important tasks. Linux comes with various utilities for reporting. Following article contain shell script which will help you to find it out how much CPU or Memory is consuming every user. Continue reading
When filesystem is growing up, we need to analyse what is going on and why is our filesystem running out of space. The best for checking usage is combination of commands like df, du or find. to have it all in one place I wrote very simple and useful script which show largest files, largest directories or last attached/modified files.
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.
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.
During scripting in environment, where is used more UNIX/Linux platform we must adapt our scripts for slight differences between those platforms. Here is little example how we can do it and few examples how is script working at different platforms.
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.
The way how to reset or change forgotten root password on LINUX platform.
1. reset system and open single user mod by changing init option