Tag Archives: linux

Shell script for filesystem usage analysis

scripting

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.

Continue reading

less command in linux with examples

How to

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.

Continue reading

Memory checks on LINUX part 1

How to

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.

Continue reading