jcl

Linux Experts
  • Content Count

    1299
  • Joined

  • Last visited

Everything posted by jcl

  1. Doesn't work: ~/tmp/m :) $ mkdir foo foo/bar ~/tmp/m :) $ touch foo/bar/a.mp3 foo/bar/b.mp3 ~/tmp/m :) $ find foo foo foo/bar foo/bar/a.mp3 foo/bar/b.mp3 ~/tmp/m :) $ find foo/ -name "*.mp3" -exec cp {} foo.bak \; ~/tmp/m :) $ ls -l total 4 drwx------ 3 jcl jcl 4096 2008-05-01 22:21 foo -rw------- 1 jcl jcl 0 2008-05-01 22:21 foo.bak ~/tmp/m :) $ rm foo.bak ~/tmp/m :) $ mkdir foo.bak ~/tmp/m :) $ find foo/ -name "*.mp3" -exec cp {} foo.bak \; ~/tmp/m :) $ find foo.bak/ foo.bak/ foo.bak/a.mp3 foo.bak/b.mp3 If the target isn't a directory, it's overwritten by each file in turn; if it is a dire
  2. A single-stall public restroom.
  3. Bit of a roundabout way: $ cp -lr $COLLECTION $COPY $ find $COPY -type f ! -iname '*.mp3' -delete $ mv $COPY $DESTINATION $COPY is a scratch directory on the same partition as the collection, $DESTINATION is the final destination. You can remove the -delete option and add -depth before -type in the find to see what files will deleted. Alternatively, if you don't mind the extra copying, you can just cp -r to the destination and run the above find there.
  4. That's an article about printer drivers. Printer drivers are indeed user-mode drivers (now).
  5. Kernel-mode drivers can map specific physical address ranges with MmMapIoSpace() or ZwOpenSection() and ZwMapViewOfSection(). Which is unavoidable for VM. The pages aren't even stored in a single file, let alone sequentially and contiguously. Even the pages in the page file can't be contiguous because processes can share pages. [Edit: Unavoidable, blast it. Fixed.]
  6. That doesn't reduce fragmentation of the contents of the page file: even if the file is physically contiguous, the pages aren't guarantied to be ordered within the page file. You'd need to sort and compact the page file after every page (de)allocation to prevent logical fragmentation. (Or reserve 2 GiB/8 TiB for each process and hope that the page file is sparse enough that you don't run out of disk space.)
  7. They're right about fragmentation: it shouldn't affect maximum VM or drastically affect VM performance. Even if it does, file-level defragmentation isn't going to solve the problem: the page file is internally fragmented (i.e., the pages belonging to a given process aren't stored contiguously), non-copy-on-write pages mapped from files (e.g. EXE and DLL code segments) are backed by the mapped files rather than the page file, and paging is non-sequential. But that was probably lucky guess on their part.
  8. No and no. wget doesn't do what you want and the 'script' -- it was a one-liner -- I used for the benchmark definitely doesn't do what you want.
  9. FWIW, with wget I get around 130 HEADs per second on loopback, around 150 on my LAN, and around 7 on the interwebs at large. The process seems to be latency-bound: CPU and network load are negligible, almost imperceptible, in all cases. So, I suppose probing might not kill the target server, but if hitting it as hard as possible only yields 5 HEADs per second....
  10. It looks like libjingle support was merged into Psi mainline and the psi-jingle branch died a few months after that post was written.
  11. It's possible to violate the site operator's expectation that the files won't be accessed by random people, but that expectation is so unreasonable, and the 'attack' so banal, that I wouldn't call it hacking. Even security through obscurity should be robust against typos. Pr0nz?
  12. Several years ago I was having frequent X-related lock-ups that (IIRC) I attributed to the NVIDIA driver. The system was still alive after most of them -- they weren't kernel panics -- but when X went down it took the keyboard, mouse, and display with it. I finally figured how to use the Magic SysRq to break out of X and restart it but I don't believe I ever found a way to completely restore the console. The problem went away eventually and hasn't recurred, though that could be because I'm using the NVIDIA legacy driver now.
  13. "Brute force" would mean testing every possible URL that fits the pattern. There are at least 10613 potentially working URLs that fit the pattern "www.example.com/*".
  14. It's universal. OS X, Fedora, SUSE, and FreeBSD, for example, have had releases that provoked similar responses. With apologies to Bjarne Stroustrup, there are only two kinds of programs: the ones people complain about and the ones nobody uses.
  15. The front page HTML is borken. The headline is green in Opera but not in Firefox because Opera's rendering a form (the "newsFlashDate" one) that Firefox is ignoring. The blinking text doesn't blink in IE because (AFAIK) IE doesn't support the blink element. AFAICT all of the browsers are rendering the page correctly.
  16. If it does, you should find the to-be-deleted files in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
  17. jcl

    Help With Xml

    All of the major browsers understand XML. Better than HTML, in some cases.
  18. jcl

    Help With Xml

    Faster in what sense? Anyway, XML has no predefined presentation -- or much of anything else, for that matter -- so you need to provide style sheets if you want the document to be presentable, so to speak.
  19. AFAIK it's basically the same on Windows. The physical disks can be accessed via Win32 at \\.\PhysicalDriven for n >= 0. Once you have the boot sector you can extract or modify the partition table easily enough. The format is dead simple if the bootloader uses LBA and not much more complicated if it uses CHS addressing.
  20. It's occured to me that it would be a good idea for people to record their partition maps somewhere so they can reconstruct the partition tables if needed. Rebuilding the master partition table, at least, is easy if you know the layout and formats of the partitions. Alternatively, someone could do something really crazy like store backup copies of the boot sector at known locations on the HDD -- like, say, the second sector -- and provide an option to redirect the BIOS to them. Or, gee, I don't know, save a copy in the CMOS or BIOS PROM, if the massive 64 bytes of storage that's required isn't
  21. Indeed. NT already uses virtualization extensively. There's NTVDM (NT Virtual DOS Machine) for DOS-compatibility, WoW (Windows-on-Windows) for 16-bit Windows compatibility, WoW64 for 32-bit Windows compatibility on 64-bit Windows, the old POSIX and OS/2 subsystems for Unix and OS/2 compatibility, Hyper-V, Virtualization Server, etc. It seems like the tricky part of doing what the article describes would be extracting the kernel-mode part of the Win32 subsystem and moving it to userspace.
  22. Rebuttal from Paul Thurrott. (Insert joke about not knowing what to think because random bloggers and Thurrott are equally credible.) If Microsoft actually did what that article describes, I'd drop Linux in a heartbeat.
  23. That's pretty much how it's done on Unix. Iterate through the argument vector, when you find a flag that takes an argument at argv[n], grab the argument from argv[n+1] and bump n for the next pass. If you want a general solution, look at Unix's getopt(3) for inspiration. (On the off chance that you're using GTK#, you might check if it includes GLib's GOption command-line parser.)
  24. Could you move a bit to left? Little more. Right, by the target. Great, now hold still....
  25. i can haz rail freight?