Reputation
32,966
Next tag badge:
323/400 score
97/80 answers
Badges
4 58 105
Newest
 Good Answer
Impact
~1.6m people reached

Apr
1
comment rsync excluding empty files
Also, it's not possible to have some of the hard links to a file be of a different size. All hard linked names are to the same file. If this isn't just a case of using the wrong term, and you actually have two hard links to the same file showing a different size—you have something very, very broken.
Apr
1
comment rsync excluding empty files
You might want to look at rsync's --backup options...
Apr
1
comment Is it possible to establish a Socket session (between Server and Client) using shell commands ?
@mikeserv socat added. I'll note though that your immediate pipe cleanup isn't really any safer—both are only safe if file permissions keep an attacker from opening the pipe or rm'ing it (and replacing with something else, like a symlink) before the intended code opens it
Apr
1
revised Is it possible to establish a Socket session (between Server and Client) using shell commands ?
add socat
Apr
1
comment Total data usage history with SNMP
@Muneer well, when it hits 2³² bytes (octet = 8-bit byte), it should roll over. You'll have to poll frequently (possibly very frequently) to get a good count, depending on the bitrate. 32-bit rollover is slightly over 5 minutes at 100mbps, around 30s at 1gbps. You need to poll several times faster than that, to distinguish between rollover and reset-to-0 (e.g., power cycle). dev.openwrt.org/ticket/13597 has something about adding 64-bit counter support. There are, BTW, existing open source tools which handle this stuff, including at least Cacti and MRTG.
Apr
1
comment Is it possible to establish a Socket session (between Server and Client) using shell commands ?
The most interesting one I didn't mention is probably socat, I'll add that one in later tonight.
Apr
1
comment Is it possible to establish a Socket session (between Server and Client) using shell commands ?
@Scott indeed. And several more, including an optional bash feature, at least a kernel patch or two, etc. Feel free to edit in any you find important...
Apr
1
comment Debian Jessie - Random freezes
[ 25.140] (II) NVIDIA GLX Module 340.65 Tue Dec 2 09:10:06 PST 2014 ... that's your NVIDIA version on Debian, I presume. Same one on Ubuntu? Basically, Ubuntu and Debian are fairly similar. So need to find where the difference is—surely that's what's causing the problem on Debian.
Apr
1
comment brace expansion and * expansion
shopt -s nullglob may help (at least in bash)
Apr
1
answered Is it possible to establish a Socket session (between Server and Client) using shell commands ?
Apr
1
comment Debian Jessie - Random freezes
Well, you're using one of those drivers on Ubuntu—it probably just installed it for you automatically. What does /var/log/Xorg.0.log look like? How different is it under Ubuntu?
Mar
31
comment How many bytes can a keypress return? And should a metafied key return more?
It was all on one line. But I probably corrupted your script when copying & pasting.
Mar
31
comment How many bytes can a keypress return? And should a metafied key return more?
Yeah, I did a copy and paste, from a browser. You might want to post a link where someone can just curl it w/o it being corrupted... I'm not sure what it should print. UTF8 characters are multiple octets. Certainly a single keypress can produce a UTF8 character. (But with macros, a single keypress could also produce many plain ASCII characters.)
Mar
31
comment How many bytes can a keypress return? And should a metafied key return more?
compose - - . got me \342:226 \200:128 \223:147. You can of course map – to one keypress, instead of the many I used...
Mar
31
answered Is it possible to have multiple virtual machines with the same (guest) ip on the same host?
Mar
31
revised Total data usage history with SNMP
since we don't have mathjax here, apparently.
Mar
31
answered Total data usage history with SNMP
Mar
31
comment Is it possible to have multiple virtual machines with the same (guest) ip on the same host?
so that i can clone and use them without changing the settings in the guest → Have you considered DHCP? Sounds much saner. Remember you can use DHCP reservations to give each VM a static IP via DHCP with all the config being on the DHCP server(s).
Mar
31
comment How to set path in cronscript
... or if its using the current working directory, cd /path/you/want && /path/to/php… might work. But really, you ought to just edit the PHP script to take a path.
Mar
31
comment Debian Jessie - Random freezes
Somehow I missed that Ubuntu works. Are you using the same version of the nVidia drivers under both Ubuntu and Debian? Make sure you're not, e.g., using the open-source (nouveau) driver under Debian and the proprietary one under Ubuntu (or vice versa).