17,677 reputation
22159
bio website openpgp-courses.org
location Berlin, Germany
age 37
visits member for 1 year, 5 months
seen yesterday

main interests: Linux (openSUSE), Shell (bash), crypto (OpenPGP/GnuPG, SSH, SSL/TLS), device mapper / LVM, networking (iptables, iproute2), virtualization (KVM)

OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5


Jul
16
revised how to use the eval command in order to print the value of parameter
deleted 21 characters in body; edited tags
Jul
16
reviewed Close Low level system call
Jul
9
comment What is the difference between these two SSHD configs?
@arielf I haven't tried it. Otherwise I wouldn't have written "may". The !root,* is from the man page. What exactly do you mean?
Jul
4
comment Match two words that is on the same line
I don't see the regex there, let alone the PCRE. So why grep -P instead of grep -F?
Jul
4
comment How do I enable &>/dev/null by default for all sh/bash commands?
@John1024 That's strange: I thought that it should work with /dev/tty. I tested that and it didn't work thus I used the other way. If I test it again now it works... No idea what may have gone wrong before.
Jul
4
revised How do I enable &>/dev/null by default for all sh/bash commands?
deleted 14 characters in body
Jul
3
comment How do I enable &>/dev/null by default for all sh/bash commands?
@richard I did not mean only what the shell prints automatically but also the commands you type (which are not affected by PS1).
Jul
3
answered How do I enable &>/dev/null by default for all sh/bash commands?
Jul
3
revised Remove files and directories even if not empty, except some directories
added 692 characters in body
Jul
3
comment Remove files and directories even if not empty, except some directories
@AndrewWright You don't know how grep works. The -e values are regular expressions. * in a regex does not what you obviously expect. Next problem: find . gives . as first result. Your grep matches . and rm -r . deletes the whole directory tree.
Jul
3
revised Remove files and directories even if not empty, except some directories
added 9 characters in body
Jul
3
comment Remove files and directories even if not empty, except some directories
That is not going to work but would delete the whole directory tree from the search point (in combination with rm -r). It is kind of ridiculous that this is the accepted answer.
Jul
3
answered Remove files and directories even if not empty, except some directories
Jul
3
comment `crontab -e` sometimes fails with “Creation of temporary crontab file failed”
@Emmanuel And that was a message to me...?
Jul
2
awarded  Curious
Jul
2
awarded  Nice Answer
Jul
1
comment calculate sum of squares using shell script in perl/awk
@Ramesh My awk does recognize such numbers: echo 0.05 3.59564e-185 | awk '{print $1 * $2}'; echo 0.05 3.59564e-85 | awk '{print $1 * $2^2; }'
Jul
1
comment Why does ssh -g say that address is already in use?
That is strange. For a better understanding of the problem you can run ssh through strace and have a look at the last syscalls before the error message: strace -o ssh.strace ssh -g -L 5115:localhost:5115 <server>. Terminate ssh as soon as the connection is established and have a look at the file ssh.strace.
Jul
1
comment Why does ssh -g say that address is already in use?
What is (on both systems) the output of netstat --inet --inet6 -nlp | grep 5115?
Jul
1
comment nc -l in background closes immediately (nc -l 1234 &)
The strange thing about this is that it seems that something immediately connects to the nc socket (accept(3, ...; but without sending anything). For some reason the connection is closed then. Maybe the timeout. strace -t gives time stamps.