Reputation
4,718
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 9 26
Newest
 Necromancer
Impact
~249k people reached

Sep
27
comment rm on a directory with millions of files
commit: that's pretty slick! Thanks for the pointer.
Sep
27
comment rm on a directory with millions of files
Lastly, FYI, not mentioned in that link is that fact that data=writeback can be a huge security hole, since data pointed to by a given entry may not have the data that was written there by the app, meaning that a crash could result in the old, possibly-sensitive/private data being exposed. Not a concern here, since we're only turning it on temporarily, but I wanted to alert everyone to that caveat in case either you or others who run across that suggestion weren't aware.
Sep
27
comment rm on a directory with millions of files
Writeback looks stellar, except the documentation I was looking at (gentoo.org/doc/en/articles/l-afig-p8.xml#doc_chap4) explicitly mentions that it still journals metadata, which I presume includes all the data I'm changing (I'm certainly not changing any data in the files themselves). Is my understanding of the option incorrect?
Sep
27
comment rm on a directory with millions of files
Interesting, so perhaps the fact that the files were being created over a long period of time is relevant? But that shouldn't matter; the block cache should have all of the pertinent metadata blocks in RAM. Maybe it's because unlink(2) is transactional? In your estimation, would turning off journaling for the duration of the rm be a potential (albeit admittedly somewhat dangerous) solution? It doesn't look like you can just turn off journaling entirely on a mounted filesystem without a tune2fs/fsck/reboot, which somewhat defeats the purpose.
Sep
23
comment rm on a directory with millions of files
Each filename was exactly 36 characters long.
Sep
23
comment rm on a directory with millions of files
That said, if there's no per-directory file limit, why did I get "ext3_dx_add_entry: Directory index full!" when there were still inodes available on that partition? There were no subdirectories inside this directory.
Sep
23
comment rm on a directory with millions of files
Indeed, I noticed just this behavior after deleting everything. Luckily, we had already mv'd the directory out of the "line of fire", as it were, so I could just rmdir it.
Sep
23
comment rm on a directory with millions of files
I really like this answer, actually. As a practical matter, in this case, no, but it's not one I would have thought of. Bravo!
Sep
23
comment rm on a directory with millions of files
As to rm being very slow, "time find . -delete" on 30k files: 0m0.357s / 0m0.019s / 0m0.337s real/user/sys. "time ( ls -1U | xargs rm -f )" on those same files: 0m0.366s / 0m0.025s / 0m0.340s. Which is basically margin-of-error territory.
Sep
23
comment rm on a directory with millions of files
rm -rf ran for a day and a half, and I finally killed it, without ever knowing if it had actually accomplished anything. I needed a progress bar.
Sep
22
comment Installing Zend Server via Puppet, on RHEL and Ubuntu?
Indeed, that's how we do it.
Aug
24
comment mysql dump of talble limit 100
That's hideous and hilarious. Well-played. And here I was writing a script!
Aug
24
comment How can I figure out if port 25 is blocked on my network?
John: "filtered" means that no response was received from the server. "Closed" means a TCP RST was received. The former usually indicates that a firewall has blocked the connection (as they rarely issue RSTs for their "deny" rules), while the latter typically indicates that there really is nothing listening on that port, albeit with the caveat that, with a bit of effort, a crafty net.admin can completely mess up that set of assumptions.
Aug
24
comment How can I figure out if port 25 is blocked on my network?
Slick! You can even specify a port with "-p", so it'd be "tcptraceroute -Tp 25 mydomain.tld" in this case. Thanks for the pointer.
Aug
17
comment Remotely view or logon as another user
First off, this is just patently wrong-headed. If you're the administrator, you can already impersonate someone with impunity, either by logging a message of any kind, or, if that's not sneaky enough, installing a driver that can do even scarier (and even harder-to-trace) things. Nothing the OQ is asking for is impossible at a technical level. Whether it's advisable, or violates ethics standards, or is more difficult than other potential solutions--those are separate questions that deserve proper airing. Simply saying, "sorry, nope, it's impossible," is neither helpful, nor even correct.
Aug
6
comment Vim Pattern replace
Try using a different delimiter for clarity, since you have "/" in your pattern: "%s#<created>\n\s*\w*@\w*\n</created>#newstring#".
Aug
5
comment change directory automatically on ssh login
It's possible, just probably not advisable. Something like replacing ssh with a small shell script or alias that passes the host name as a variable to be exported (a la "ssh -t user@host 'export connhostname=host; bash --login'"). But you're starting to get into very strange territory, indeed. Perhaps a better question is, WHY do you want this behavior?
Aug
5
comment How can I add more than 255 machines to a single Class C network?
In the original classing system, the two high-order bits determine the Class of the address. Having a netmask of 255.255.255.0 makes it Class C-sized, but it doesn't make it Class C.
Aug
5
comment Date of Recent RAM Upgrade (Optiplex 745 w/ XP Pro SP3)
Confirming, the BIOS should have a log event about it. I believe there's a tool to view/clear those log messages without rebooting for Dells, but if not, the BIOS setup screen accessible on bootup should have the option for which you're looking.
Jul
30
comment Is it risky to have a database server and a web server on the same machine?
I don't think anyone's saying that a two-box solution isn't safer. However, the question was whether that risk was, to quote the question, "big". The answer is obviously going to depend on circumstances--I wouldn't run an Internet-facing banking site on a single machine, for example. But a properly-locked down Web server, once compromised, should have no more or less access to its database server than it did before being compromised, and that principle is independent of whether the solution is on two machines or one. If that's not true, it's time to re-architect the system.