FUN WITH LINUX

Recovering deleted files using grep

4 January 2015

If you accidently deleted a text-file, you might be able to recover it using grep:

$ grep --binary-files=text --context=x 'stringfromyourfile' \
    /dev/whateverPartition > someFile.txt

x are the lines before and after the string.

I found this idea on this blog.

Read more..
SSL-Problems after upgrading Thunderbird

3 January 2015

Today I upgraded Thunderbird and then my SSL-connections to postfix did not work. In /var/log/mail.log i found the following:

SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1258:SSL alert number 48:

After a while i found this solutions

Just change the following thunderbird-setting:

security.use_mozillapkix_verification to false
Read more..
Merry Christmas

22 December 2014

I wish you a very merry christmas and a geeky new year…


                                        |
                                      --+--
                                        |
                                        |
                                       / \
                                      /   \
                                    '/     \'
                                    I-  *  -I
                                      |   |
                                     /     \
                                    /       \
                                   /         \
                                 '/           \'
                                 I- *   *   * -I
                                   |  *   *  |
                                  /           \
                                 /             \
                                /               \
                               /                 \
                             '/                   \'
                             I- *       *       * -I
                               |    *        *   |
                              /                   \
                             /                     \
                            /                       \
                           /                         \
                         '/                           \'
                         I-----------------------------I
                                       MMMM
                                       MMMM
                                       MMMM
                                       MMMM
                                       MMMM
Read more..
Delete all mails in mutt

22 December 2014

If you have thousands of emails in your mailbox, the fastest way to delete them all is by open the maildir in mutt( mutt -f MAILDIR ) and do the following:

D(shift+d)

and then:

~s .*
Read more..
stegif.pl

19 December 2014

Guess What

Read more..
A nice way to get disk usage statistics

19 December 2014

I wrote an article about “List disk usage of files and directories”. A more “graphical” way to do this is using ncdu. It’s a very useful, neat little ncurses programm.

Read more..
Guess what..

19 December 2014

Read more..
check-script for zonetransfers

16 December 2014

This script checks if a dns-zone-transfer for a specific domain is possible on it’s domain-servers. A zonetransfer should for security reasons only be possible between 2 trusted dns-servers.

DOMAIN="example.com" && for i in `host -t ns $DOMAIN | awk '{print $4}'`; do host -a -l $DOMAIN $i; done
Read more..
Copy the partition table from one disk to another

16 December 2014

Sometimes it is neccessary to copy the partition-table of one disk to another. Mostly this is needed when a disk should be replaced on a software-raid-array. The method described here also works for GPT-Tables..

Read more..
Useful OpenSSL Commands

16 December 2014

Generate encrypted password (md5)

openssl passwd -1 'notsosecret'
Read more..
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti