You are hereLinux Hints

Linux Hints


By admin - Posted on 07 März 2009

All Linux Hint articles can be accessed through this page:

fail2ban startup iptables error
SSL hints and using SSL announce with rtorrent
Rtorrent compilation + problem solving
Useful debian commands
Some tips for using lftp
SMB/Samba Problem with low disc space
Compiling Truecrypt on Debian
wubi, grub, twinView and slow dns resolving
Useful tips for gcc/gdb and assembly
Rtorrent does not accept incorrect self signed server certificates
Control keys do not work in rtorrent
Debian ulimit - change maximum number of open files for a user

One tip for vi searching:
Use "/" command to search (forward) for a certain term and after that "n" to search the next occurence. "?" is backward search.

To do a case insensitive search use "/\c searchpattern".
Case sensitivity is default.

To go to the end of file with vi use ":$" - for the beginning use ":0"

To execute multiple commands after each other in the linux shell chain them with a semicolon. In case of an error, all commands get executed. If you use &&, then the second command only gets executed if no error was reported by the first.

A nice text browser for linux is lynx!

To connect to a mail server using SSL/TLS on imap port:
openssl s_client -connect mail.myserver.com:993

If you use apt and get the following error under debian
"Dynamic MMap ran out of room", and can not install any software anymore, then change the file:
/etc/apt/apt.conf or /etc/apt/apt.conf.d/70debconf
(depending on which one you have)

Add the line:
APT::Cache-Limit "16777216";
to increase the cache limit for apt!

Don't forget to issue "apt-get clean" from time to time:)

Output redirection:

mycommand > file.log 2>&1 (Writes both stdout and stderr to file.log)
mycommand &> file.log (Maybe does the same, not tested)

mycommand 2> error.log (Only write stderr to file)

Check http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html for further details!

Registered users can add comments to the articles. The registration process requires verification using an arbitrary email adress. Comments are moderated and spam of any form will not be published (spammers do not try - you have no chance).

Registrierte Benutzer können Kommentare zu den Artikeln schreiben. Die für die Registrierung erforderliche Authentifizierung erfolgt über eine beliebige Email Adresse. Kommentare werden erst nach erfolgter Durchsicht veröffentlicht um Spam zu verhindern.