Reputation
25,970
Next tag badge:
96/100 score
19/20 answers
Badges
3 39 88
Impact
~2.8m people reached

2h
comment set variable inside heredoc and use them outside
@AsafMagen - then why have the evaluation of ls -l /tmp | wc -l inside a "here document"? Just evaluate it and be done.
1d
comment wpa_supplicant problems
the wpa_supplicant output looks maybe like it associated with the access point, but disconnects after some time. I thought that if dhcpcd wasn't running, then wpa_supplicant just times out and disconnects.
1d
comment wpa_supplicant problems
Do you have dhcpcd running for that interface?
Apr
7
comment What File System for a slow drive?
@SamuelePilleri - I don't know about Reiser4, but the original ReiserFS was pretty good. I used it for some years on about 4 machines with no bad experiences. I personally never got killed, but your mileage may vary.
Apr
5
comment Why does “head /bin/ls” reset the terminal
stty sane is at least somewhat more portable, and might do a more complete job of resetting everything.
Apr
5
comment what can cause a socket() “Permission denied” error?
I don't get an error under Arch linux on an x68_64 laptop. I suspect this is an Android thing.
Mar
28
comment Ethernet intermittently fails to come up
It might be a failing ethernet card. I've seen much the same thing on an elderly PC - ethernet would occasionally not come up, or come up in half-duplex or in some configuration even stranger. The symptoms got worse with age over a few months.
Mar
24
comment Where can I find a dictionary file of common words?
@l0b0 - Good point. I misread your question when I answered it. My own biases led me to believe that you were looking for a list of "stop words", words to avoid as "too common".
Mar
19
comment What program(s) is(are) lowering my entropy pool level?
That is a super cool idea. I'm going to try to duplicate it.
Mar
15
comment How can I detach a process from a bash script?
nohup isn't quite the right answer. You should add some pseudocode or example code to show more precisely what you want.
Mar
14
comment Is it possible to allocate RAM for all the code and data in an ELF file during loading?
The "loading" part is all kernel operations, which are the inner workings of the execve() system call. I don't think there's any way to do what you're asking for. It's almost possible to do an execve() from user land (stratigery.com/userlandexec.html) but that also is not what you're asking for.
Mar
12
comment Apache shows Blank page for PHP
Do you have the file /etc/httpd/conf.d/php.conf, and can the apache user ID read it?
Mar
12
comment non-reentrant libraries in shared memory?
@RuiFRibeiro - It is said that one of the advantages of dynamic libraries is code sharing. The way ELF shared objects work, the kernel can do that. The "RE" LOAD header parts can be shared all over. It should also be possible to map the global variables (the "R W" LOAD header) as copy-on-write, so that as long as some process has it mapped, the kernel can just set up a mapping, vs reading it in from disk. So even the globals can be shared in a way.
Mar
10
comment How does FING (or any of the IP/MAC Address Mappers) work?
@bonsaiviking - you are correct, in that if you run nmap as root, it does do the raw socket things. After looking over the source code in nmap..c, there's a value o.isr00t that when set to false, causes nmap to create regular TCP sockets, and call connect() on each IP address. When true, it does the raw socket thing.
Mar
10
comment How does FING (or any of the IP/MAC Address Mappers) work?
@bonsaiviking - connect() system calls show up for consecutive IP addresses in the strace output. I was looking for some weird raw socket thing, and I was surprised to see the connect() calls show up. I did not look through nmap source code, however, and I also just ran "nmap -sn 172.31.0.0/24", so it's possible that I missed something important.
Mar
3
comment Slow SSH connection on embedded platform
I've noticed this with an Arch Linux Raspberry Pi. My current guess is that not enough entropy exists on the Raspberry Pi to do something - generate cryptographically secure random numbers, maybe? Didn't early Android phones have a pausing problem because of lack of entropy?
Feb
24
comment how to create table with fields in command line Centos
@cea - MariaDB data types: mariadb.com/kb/en/mariadb/data-types varchar(80) is a character string, of maximum length 80 characters. 80 characters can mean a lot more than 80 bytes if you use UTF-8 character set, and non-Latin (Cyrillic, Mandarin, etc) characters.
Feb
24
comment how to create table with fields in command line Centos
@cea - see edited answer.
Feb
23
comment Why is the circumflex/caret character used as a symbol for Ctrl?
Even the original vi (at least the one in SunOS 3.5) used a caret/circumflex in front of letters to reprecents ctrl-C, ctrl-V, etc. stty did and does that, too. On the other hand, ^ worked as a synonym for | in shell scripts during that era, so you'd always have to backslash the caret in stty invocations. Good question.
Feb
18
comment Run this PHP file via Cron Job
@dprestia - you've done my option (2). That much looks good. PATH probably has /bin:/usr/bin and that's all. Since your PHP code uses $argv[1], you will have to change the crontab entry to contain that extra command line parameter: /usr/bin/php /home/apresv/fix_hack.php /whatever/directory/subdirectory, with the desired directory name instead of the fake path.