Jun 162014
 

Tee

The command “tee” it’s one of the basic commands that you should find in any system, yet it’s not so popular or use, this command reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.

In short if you want to redirect the STDOUT of any command as well as printing it to the screen, tee is the right tool to use, let’s see some practical use of this command.
Continue reading »

flattr this!

Feb 192014
 

Original article by http://blog.shineservers.com/

Sometime a process “hang” both if you are using Gnu/Linux on your desktop (maybe a game ?) or as server, in these cases the best thing to do it’s to terminate that process, that probably is using precious resources, the basic commands to do this from a terminal are kill and killall.

killall is a tool for ending running processes on your system based on name. In contrast, kill terminates processes based on process ID number or “PID.” kill and killallcan also send specific system signals to processes. Use killall and kill in conjunction with tools including ps to manage processes and end processes that have become stuck or unresponsive when necessary.

Continue reading »

flattr this!

Feb 102014
 

An old article by Todd Partridge (Gently) but still really useful if you are writing some bash scripts and want them more readable with some colors:

Users who have been using Linux for awhile often learn that creating a basic script is a good way to run multiple, often-repeated commands. Adding a little color to scripts can additionally provide nice feedback. This can be done in a fairly straight-forward way by using the tput command.

Continue reading »

flattr this!

Dynamic DNS with Bash & Afraid.org

Recently I’ve published an article about “DynDNS and ddclient: access your Linux from anywhere“, and some people commented that the services on DynDNS are not free anymore, so this is an alternative by Adam Buchanan first published on his interesting blog — This has nothing to do with search engine marketing, but everything to do with [...]

Linux shell: Introduction to Flock

Recently a colleague of mine should run multiple parallel jobs on a server (around 20 in our specific case), every job does “an elaboration” and this can take a time longer or shorter in respect of the others, once a job finishes its task it must read from a text file the first line that [...]