795 reputation
29
bio website
location
age
visits member for 2 years, 4 months
seen yesterday

Feb
16
comment How to protect against loss of server on a budget
Good and easy way to present it. (But ... I'd just add some price somewhere, as 3 to 10 times "free" is still free ;). Or, of course, you mean the overall cost of the service itself? )
Feb
12
comment Do you have any useful awk and grep scripts for parsing apache logs?
Elegant and simple. Good.
Feb
12
comment Command line tools to analyze Apache log files
I'm very surprised... I didn't "criticize" at all, just pointed 2 remarks (and said that indeed the method you used can be usefull in other cases, but here is just not needed)...
Feb
10
comment Command line tools to analyze Apache log files
2 remarks: The date is not really in field 4 but in fields 4 + 5 ^^ (without the shift from GMT, the date has little value). And an access_log has most of the time 12 fields form (actually, there could be more than 12 fields, as the 12th is the http agent, which can contain many spaces in its name too.. the first 11 fields are easy to parse, and the 12th field (and maybe more) remaining should be the http agent). So you can just: awk '($9 == 200) {print $6,$7,$8}' to display the same thing as in your example. No need to use FPAT there (even though this method can be usefull in other cases)
Feb
5
comment What is fastest way to copy a sparse file? What method results in the smallest file?
tar is a good one to try too
Jan
2
comment Understanding zpool status output
more context ( from docs.oracle.com/cd/E19253-01/819-5461/gbbxi/index.html ): "The simplest way to check data integrity is to initiate an explicit scrubbing of all data within the pool. This operation traverses all the data in the pool once and verifies that all blocks can be read. Scrubbing proceeds as fast as the devices allow, though the priority of any I/O remains below that of normal operations. This operation might negatively impact performance, though the pool's data should remain usable and nearly as responsive while the scrubbing occurs." Follow it with zpool status -v tank
Dec
3
comment Linux - Is there a way to prevent/protect a file from being deleted even by root?
... I actually +1 this, I didn't knew about chattr +i file .. It's linux specific, but good to know.
Dec
3
comment Linux - Is there a way to prevent/protect a file from being deleted even by root?
Please note that whatever the right on the file is, if someone has the "w" right on the directory that holds that file, that person can delete/rename the file (in a simplified way: a filename is just a link to an inode, written in the directory's entry. You can unlink (rm) it if you can edit that directory's entry (=if you have w right on the directory itself). When a file doesn't have any remaining links to it, it's "deleted" (but opened fd to that file still are usable, until all fd to it are closed. The FileSystem usually only "frees" the space when all links & all fd to the file are gone)
Nov
21
awarded  Yearling
Nov
4
comment Mean Time Between Failures — SSD
Good sobering view that a 1'500'000 hours MTBF means really "If I have 1000 ssd like this one, 3 are likely to fail within 6 months (some even earlier than that) ..." . +1 (and as the tests are over a short period, expect the life span of those to not exceed too much the warranty... the "MTBF" probably drops a lot when your drive reaches N years old)
Sep
8
comment How to recover data from a messed up drive (LVM written on top of Ext4)?
Recover if you can, or restore from latest backup (... you do have backups, don't you? ^^)
Jul
3
comment How to continue redirecting stdout to a file after logrotate moves it?
I'd still recommend, in your case, to use ">>" instead of ">" if you intend to write to a truncated file : as ">>" open in append mode, it will seek until the end of the file each time it writes. That way, when you truncate the file (making it go from XXXX bytes to 0 bytes), it will "seek until end", so will know it now has to write after byte 0. Otherwise it may write after byte XXXX, and thus create a sparse file with XXXX null bytes before it (ie, when ">", the fd can just remember where it was in that file, and write from there, without realising the file size shrunk!)
Jun
11
revised Why not assign the hostname to the loopback address in /etc/hosts?
corrected typo on hostname, and added info on protocol, and emphasis on COULD as those infos are not sure but a big probability
Jun
11
comment Why not assign the hostname to the loopback address in /etc/hosts?
I remember SIP protocols causing all sort of problems with NAT between hosts in different WAN when the advertised adress needed to be the one NAT'ed to instead of the originator's IP (STUN could help). I believe (but can't be sure) it would cause problems if it advertise the loopback's ip instead of the host's ip while talking to other hosts on the same LAN. And I trust other protocols could be even more flaky (don't know whicn ones though). iow, it could cause problems "in some cases" (for an unknown range or even nature of cases...)
Jun
10
comment What's the advantage of synchronizing UID/GID across Linux machines?
Don't forget, when changing uid/gid, to update archives (tar files, etc.), and also conf files that may use numerical ids instead of uidname/groupnames.
Jun
10
answered Why not assign the hostname to the loopback address in /etc/hosts?
Jun
10
comment Why not assign the hostname to the loopback address in /etc/hosts?
It could be a bad idea, if you do have an ip (and communicate to other hosts). Some protocols could say "tell the other guy your hostname and its ip adress" "ok. Other guy, i'm sprinkler.internal.lan(127.0.0.1)". Additionnaly some services bind only on the interface holding the ip associated to the hostname and therefore will only be able to talk with the host, noone else...
Apr
7
comment Monday morning mistake: sudo rm -rf --no-preserve-root /
I was more trying to reduce the size of the file. But if you want to save bandwidth (good idea) : just add quotes: ssh root@host "cat /dev/sda | gzip -c - " > /path/to/dir_on_huge_partition/server.img.gz (the -c option of ssh is usually good too, but you'd still need to compress at the end, as ssh will only compress at entrance of its tunnel and uncompress before sending to stdout)
Apr
7
comment Monday morning mistake: sudo rm -rf --no-preserve-root /
an entertaining (and eye opening) read, if you don't have better tools at hand than the existing system and a few backups: ee.ryerson.ca/~elf/hack/recovery.html
Apr
7
comment Monday morning mistake: sudo rm -rf --no-preserve-root /
could maybe be : ssh root@host cat /dev/sda | gzip -c - > /path/to/dir_on_huge_partition/server.img.gz (the on-the-fly gzip will or won't help depending on what the content of the filesystem is...)