fold is really nifty command line utility to make a text file word wrap. This is useful for large number of text files processing. There is no need to write a perl / python code or use a word processor.
Linux and other Unix-like operating systems use the term “swap” to describe both the act of moving memory pages between RAM and disk and the region of a disk the pages are stored on. It is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions. Now, many admins (both Windows and Linux/UNIX) follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. Let us say I’ve 32GB RAM, should I set swap space to 64 GB? Is 64 GB of swap space required? How big should your Linux / UNIX swap space be?
I’ve already written a small tutorial about finding out if a file exists or not under Linux / UNIX bash shell. However, couple of our regular readers like to know more about a directory checking using if and test shell command.
GIMP version 2.6 has been released and available for download. It is a free raster graphics editor used to manipulate digital graphics and photographs under Linux and other operating systems. It is often used as a free software replacement for Adobe Photoshop, the most widely used bitmap editor.
There are three ways to open any file under Gnome Linux / UNIX Desktop. gnome-open is the quickest and easiest way to open any file or url.
Geany is cross platform (UNIX/Windows/BSD) fast, powerful, easy to use integrated development environment for PHP, Java, C and much more. If you wanted to quickly edit source code, Geany is for you. Here’s an introduction to using Geany’s built-in features, including the IDE and built-in development capabilities.
TrueCrypt version 6.0 has been released and available for download. It is free open-source hard disk encryption software for Windows Vista/XP, Mac OS X, and Linux system.
Linux netconsole kernel module allows dmesg output to be transmitted via the syslogd network. It is kernel-level network logging over udp allowing debugging of problem where disk logging fails and serial consoles are impractical. This is a step-by-step mini howto about netconsole configuration under Red Hat, CentOS, Fedora and Debian Linux.
From my mailbag the other day I received an interesting suggestion about obtaining information regarding all running process and network connections remotely using inetd / xinetd :
SSH client can be used to execute a command(s) on a remote UNIX box. Same technique can be used to get current network and system information using netstat information:
ssh you@remotebox netstat -a
ssh you@remotebox netstat -tulpn
He suggests that above command can be run via inetd / xinetd so that admin can connect easily and get information using telnet from 100s UNIX boxes. All you have to do is open /etc/inetd.conf under UNIX / Linux:
# vi /etc/inetd.conf
Append following line:
netstat stream tcp nowait root /bin/netstat netstat -a
# /etc/init.d/openbsd-inetd restart
Next, use telnet to connect to the netstat service (port 15) and get network connection information:
$ telnet server-name netstat
$ telnet 192.168.1.5 15
Connected to 192.168.1.5.
Escape character is '^]'.
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:6881 *:* LISTEN
tcp 0 0 *:6081 *:* LISTEN
tcp 0 0 *:nfs *:* LISTEN
tcp 0 0 localhost:6082 *:* LISTEN
tcp 0 0 *:54053 *:* LISTEN
tcp 0 0 *:59275 *:* LISTEN
tcp 0 0 *:netstat *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 localhost:webcache *:* LISTEN
tcp 0 0 *:43218 *:* LISTEN
tcp 0 0 *:domain *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 *:3128 *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp 0 1 vivek-desktop.loc:48925 bas4-kitchener06-:56662 SYN_SENT
tcp 0 0 vivek-desktop.loc:54791 customer5673.pool:16273 ESTABLISHED
tcp 0 0 vivek-desktop.loc:38398 59.94.1xx.yy:45483 ESTABLISHED
tcp 0 0 vivek-desktop.loc:42048 60.21.zz.yyy:23235 ESTABLISHED
unix 3 [ ] STREAM CONNECTED 15973
unix 3 [ ] STREAM CONNECTED 15947 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 15946
unix 3 [ ] STREAM CONNECTED 15936 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 15935
unix 2 [ ] DGRAM 15931
unix 3 [ ] STREAM CONNECTED 15916
unix 3 [ ] STREAM CONNECTED 15915
unix 2 [ ] DGRAM 15906
Connection closed by foreign host.
There are few problems with this solution:
a] Unnecessary service running at port # 15
b] Telnet protocol is not secure
c] I strongly recommend using ssh and password-less login for scripts to obtain this kind of information:
ssh user@remote-box netstat -a
ssh user@remote-box df -H
ssh user@remote-box free -m
ssh user@remote-box /path/to/script.pl
A long time ago I wrote about Linux command line bittorrent client. Recently I switched from command line client to a GUI based client called Deluge.
Deluge is a lightweight, open source free software and cross-platform BitTorrent client (bt client). A Bittorrent client written in Python/PyGTK which offers following benefits:
[a] Full Encryption – To avoid ISP’s bandwidth throttling system (note encryption is not here to protect you from other users)
[b] Plugin System – Just like Firefox it has features rich plugin collection; in fact, most of Deluge’s functionality is available in the form of plugins.
[c] In built RSS support to grab latest and greatest stuff.
[d] Global and per bittorrent bandwidth control.
[e] Support for selective file downloading – For example, it allows to grab a single file from 100 of files
[f] Ability to create torrent with Torrent Creator plugin
[g] Proxy support
[h] Network activity graph
[i] Network Health Monitor
[j] And much more
Quick Deluge Installation
Use apt-get command,
$ sudo apt-get install deluge-torrent
You can start Deluge by visiting Application > Internet > Deluge Bittorrent Client
(Fig. 01: Deluge Bittorent Client in Action)
Change port settings
The official ports for BitTorrent are 6881-6889, but most ISPs block or at least throttle those ports, so I recommend to use a port range of something between 50000 and 65535 or any other random range. You can change port range from Preference > Select Network tab > Setup new range > Close
(Fig. 02: Change Port Settings [ Image Credit Official Project])
Download Deluge Bittorrent Client
=> Visit Official Deluge Bittorrent Client project web site to grab latest version.