Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Toe Rag
Aug 29, 2005

Is there anyway I acheive the same thing as "next" from perl in bash?


code:
#!/bin/bash

if [ $# > 0 ];then
    cwd=$(pwd)
    for dir in $@;do
        cd $dir
        echo "::${dir}::"
        if [ -z $(command ls) ] 2>/dev/null;then
            echo "empty"
            ###here I need the same thing as "next" in perl###
        fi
        du -s * | sort -n | cut -f 2- | while read a;do du -hs "$a";done
        cd "$cwd"
    done
else
    du -s * | sort -n | cut -f 2- | while read a;do du -hs "$a";done
fi

Adbot
ADBOT LOVES YOU

covener
Jan 10, 2004

You know, for kids!

Toe Rag posted:

Is there anyway I acheive the same thing as "next" from perl in bash?

for dir in $@;do

continue?

The Remote Viewer
Jul 9, 2001

Accipiter posted:

Because you're making a copy of the file. It's the same as if you were making a copy of a read-only file on the hard disk.

Seriously, what kind of question is that?

Because Windows doesn't do it that way, and it's annoying to have to reset permissions when I'm restoring something from disc backup?

Difference in philosophies, perhaps. Windows assumes that if all you wanted to do was work with a RO file you'd just leave it on RO media.

Toe Rag
Aug 29, 2005

covener posted:

continue?

Embarrassingly obvious! Thanks.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
anyone mind helping with a hibernate issue in Arch? When i start hibernation it goes through all the steps, then turns off, then back on immediately. It's rather bizarre, suspend to ram (sleep) works just fine.

Here's the relevant portions of the log:

/var/log/pm-suspend.log
code:
/usr/lib/pm-utils/sleep.d/98smart-kernel-video hibernate hibernate: not applicable.
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
Wed Nov 12 17:36:36 PST 2008: performing hibernate
/usr/lib/pm-utils/pm-functions: line 275: echo: write error: No such device
Wed Nov 12 17:36:42 PST 2008: Awake.
Wed Nov 12 17:36:42 PST 2008: Running hooks for thaw
/usr/lib/pm-utils/sleep.d/99video thaw hibernate: success.
/usr/lib/pm-utils/pm-functions: Line 266-277 275 marked with @@@

quote:

if [ -z "$HIBERNATE_MODULE" ] && \
[ -f /sys/power/disk ] && \
grep -q disk /sys/power/state; then
HIBERNATE_MODULE="kernel"
do_hibernate()
{
[ -n "${HIBERNATE_MODE}" ] && \
grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \
echo -n "${HIBERNATE_MODE}" > /sys/power/disk
echo -n "disk" > /sys/power/state @@@
}
fi

The contents of /sys/power/disk:

[platform] test testproc shutdown reboot


I haven't much of a clue as to why it won't hibernate, It was worked before, just decided to stop without much warning, this is on a thinkpad t42. If anyone knows what could be causing it or what else I should check, please let me know!

Lucien
May 2, 2007

check it out i'm a samurai ^_^

Ashex posted:

I haven't much of a clue as to why it won't hibernate, It was worked before, just decided to stop without much warning, this is on a thinkpad t42. If anyone knows what could be causing it or what else I should check, please let me know!
kernel.log is often helpful.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!

Lucien posted:

kernel.log is often helpful.

I wasn't on the computer so I grabbed all that from random irc logs I had available, here's what I believe is the portion of kernel.log related to it:


code:
Nov 13 22:14:48 noir PM: Syncing filesystems ... done.
Nov 13 22:14:54 noir Freezing user space processes ... (elapsed 0.00 seconds) done.
Nov 13 22:14:54 noir Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Nov 13 22:14:54 noir PM: Shrinking memory... done (0 pages freed)
Nov 13 22:14:54 noir PM: Freed 0 kbytes in 0.02 seconds (0.00 MB/s)
Nov 13 22:14:54 noir Suspending console(s) (use no_console_suspend to debug)
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Synchronizing SCSI cache
Nov 13 22:14:54 noir parport_pc 00:0b: disabled
Nov 13 22:14:54 noir serial 00:0a: disabled
Nov 13 22:14:54 noir eth1: Going into suspend...
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: PCI INT A disabled
Nov 13 22:14:54 noir ACPI handle has no context!
Nov 13 22:14:54 noir e1000 0000:02:01.0: PCI INT A disabled
Nov 13 22:14:54 noir ACPI handle has no context!
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: PCI INT B disabled
Nov 13 22:14:54 noir Intel ICH 0000:00:1f.5: PCI INT B disabled
Nov 13 22:14:54 noir ata_piix 0000:00:1f.1: PCI INT A disabled
Nov 13 22:14:54 noir ehci_hcd 0000:00:1d.7: PCI INT D disabled
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.2: PCI INT C disabled
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.1: PCI INT B disabled
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.0: PCI INT A disabled
Nov 13 22:14:54 noir ACPI: Preparing to enter system sleep state S4
Nov 13 22:14:54 noir Disabling non-boot CPUs ...
Nov 13 22:14:54 noir Extended CMOS year: 2000
Nov 13 22:14:54 noir PM: Creating hibernation image: 
Nov 13 22:14:54 noir PM: Need to copy 64775 pages
Nov 13 22:14:54 noir PM: Hibernation image created (64775 pages copied)
Nov 13 22:14:54 noir Intel machine check architecture supported.
Nov 13 22:14:54 noir Intel machine check reporting enabled on CPU#0.
Nov 13 22:14:54 noir Extended CMOS year: 2000
Nov 13 22:14:54 noir ACPI: Waking up from system sleep state S4
Nov 13 22:14:54 noir ACPI: EC: non-query interrupt received, switching to interrupt mode
Nov 13 22:14:54 noir pm_op(): pci_pm_thaw+0x0/0x50 returns -16
Nov 13 22:14:54 noir PM: Device 0000:00:00.0 failed to thaw: error -16
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.0: power state changed by ACPI to D0
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.0: setting latency timer to 64
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.1: power state changed by ACPI to D0
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.1: PCI INT B -> Link[LNKD] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.1: setting latency timer to 64
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.2: PCI INT C -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir uhci_hcd 0000:00:1d.2: setting latency timer to 64
Nov 13 22:14:54 noir ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
Nov 13 22:14:54 noir ehci_hcd 0000:00:1d.7: PCI INT D -> Link[LNKH] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir ehci_hcd 0000:00:1d.7: setting latency timer to 64
Nov 13 22:14:54 noir pci 0000:00:1e.0: setting latency timer to 64
Nov 13 22:14:54 noir ata_piix 0000:00:1f.1: restoring config space at offset 0x1 (was 0x2800003, writing 0x2800007)
Nov 13 22:14:54 noir ata_piix 0000:00:1f.1: PCI INT A -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir ata_piix 0000:00:1f.1: setting latency timer to 64
Nov 13 22:14:54 noir Intel ICH 0000:00:1f.5: PCI INT B -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir Intel ICH 0000:00:1f.5: setting latency timer to 64
Nov 13 22:14:54 noir ata2.00: ACPI cmd ef/03:42:00:00:00:a0 filtered out
Nov 13 22:14:54 noir ata2.00: ACPI cmd ef/03:0c:00:00:00:a0 filtered out
Nov 13 22:14:54 noir ata2.00: ACPI cmd e3/00:1f:00:00:00:a0 succeeded
Nov 13 22:14:54 noir ata1.00: ACPI cmd ef/02:00:00:00:00:a0 succeeded
Nov 13 22:14:54 noir ata1.00: ACPI cmd f5/00:00:00:00:00:a0 filtered out
Nov 13 22:14:54 noir ata1.00: ACPI cmd ef/03:45:00:00:00:a0 filtered out
Nov 13 22:14:54 noir ata1.00: ACPI cmd ef/03:0c:00:00:00:a0 filtered out
Nov 13 22:14:54 noir ata2.00: ACPI cmd e3/00:02:00:00:00:a0 succeeded
Nov 13 22:14:54 noir ata2.00: configured for UDMA/33
Nov 13 22:14:54 noir ata1.00: configured for UDMA/100
Nov 13 22:14:54 noir ata1.00: configured for UDMA/100
Nov 13 22:14:54 noir ata1: EH complete
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] 117210240 512-byte hardware sectors (60012 MB)
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Write Protect is off
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] 117210240 512-byte hardware sectors (60012 MB)
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Write Protect is off
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0xf (was 0x200, writing 0x20b)
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x5 (was 0x1, writing 0x2001)
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x4 (was 0x1, writing 0x2401)
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900001)
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: PCI INT B -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir Intel ICH Modem 0000:00:1f.6: setting latency timer to 64
Nov 13 22:14:54 noir pci 0000:01:00.0: power state changed by ACPI to D0
Nov 13 22:14:54 noir pci 0000:01:00.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0xf (was 0xff0100, writing 0xff010b)
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0x6 (was 0x1, writing 0x8001)
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0x5 (was 0x0, writing 0xc0200000)
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0x4 (was 0x0, writing 0xc0220000)
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0x3 (was 0x0, writing 0x4008)
Nov 13 22:14:54 noir e1000 0000:02:01.0: restoring config space at offset 0x1 (was 0x2300000, writing 0x2300117)
Nov 13 22:14:54 noir e1000 0000:02:01.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir eth1: Coming out of suspend...
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: enabling device (0000 -> 0002)
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: restoring config space at offset 0xf (was 0x18030100, writing 0x1803010b)
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: restoring config space at offset 0x4 (was 0x0, writing 0xc0214000)
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: restoring config space at offset 0x3 (was 0x0, writing 0x4008)
Nov 13 22:14:54 noir ipw2200 0000:02:02.0: restoring config space at offset 0x1 (was 0x2900002, writing 0x2900116)
Nov 13 22:14:54 noir serial 00:0a: activated
Nov 13 22:14:54 noir parport_pc 00:0b: activated
Nov 13 22:14:54 noir sd 0:0:0:0: [sda] Starting disk
Nov 13 22:14:54 noir PM: Cannot find swap device, try swapon -a.
Nov 13 22:14:54 noir Restarting tasks ... done.
Nov 13 22:14:56 noir agpgart-intel 0000:00:00.0: AGP 2.0 bridge
Nov 13 22:14:56 noir agpgart-intel 0000:00:00.0: putting AGP V2 device into 4x mode
Nov 13 22:14:56 noir pci 0000:01:00.0: putting AGP V2 device into 4x mode
Nov 13 22:14:56 noir [drm] Loading R100 Microcode
Nov 13 22:14:57 noir evdev.c(EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See [url]http://userweb.kernel.org/~dtor/eviocgbit-bug.html[/url]
Nov 13 22:14:59 noir PM: Syncing filesystems ... done.
Nov 13 22:15:05 noir Freezing user space processes ... (elapsed 0.00 seconds) done.
Nov 13 22:15:05 noir Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Nov 13 22:15:05 noir PM: Shrinking memory... done (0 pages freed)
Nov 13 22:15:05 noir PM: Freed 0 kbytes in 0.02 seconds (0.00 MB/s)
Nov 13 22:15:05 noir Suspending console(s) (use no_console_suspend to debug)
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Synchronizing SCSI cache
Nov 13 22:15:05 noir parport_pc 00:0b: disabled
Nov 13 22:15:05 noir serial 00:0a: disabled
Nov 13 22:15:05 noir eth1: Going into suspend...
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: PCI INT A disabled
Nov 13 22:15:05 noir ACPI handle has no context!
Nov 13 22:15:05 noir e1000 0000:02:01.0: PCI INT A disabled
Nov 13 22:15:05 noir ACPI handle has no context!
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: PCI INT B disabled
Nov 13 22:15:05 noir Intel ICH 0000:00:1f.5: PCI INT B disabled
Nov 13 22:15:05 noir ata_piix 0000:00:1f.1: PCI INT A disabled
Nov 13 22:15:05 noir ehci_hcd 0000:00:1d.7: PCI INT D disabled
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.2: PCI INT C disabled
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.1: PCI INT B disabled
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.0: PCI INT A disabled
Nov 13 22:15:05 noir ACPI: Preparing to enter system sleep state S4
Nov 13 22:15:05 noir Disabling non-boot CPUs ...
Nov 13 22:15:05 noir Extended CMOS year: 2000
Nov 13 22:15:05 noir PM: Creating hibernation image: 
Nov 13 22:15:05 noir PM: Need to copy 66057 pages
Nov 13 22:15:05 noir PM: Hibernation image created (66057 pages copied)
Nov 13 22:15:05 noir Intel machine check architecture supported.
Nov 13 22:15:05 noir Intel machine check reporting enabled on CPU#0.
Nov 13 22:15:05 noir Extended CMOS year: 2000
Nov 13 22:15:05 noir ACPI: Waking up from system sleep state S4
Nov 13 22:15:05 noir ACPI: EC: non-query interrupt received, switching to interrupt mode
Nov 13 22:15:05 noir pm_op(): pci_pm_thaw+0x0/0x50 returns -16
Nov 13 22:15:05 noir PM: Device 0000:00:00.0 failed to thaw: error -16
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.0: power state changed by ACPI to D0
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.0: setting latency timer to 64
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.1: power state changed by ACPI to D0
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.1: PCI INT B -> Link[LNKD] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.1: setting latency timer to 64
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.2: PCI INT C -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir uhci_hcd 0000:00:1d.2: setting latency timer to 64
Nov 13 22:15:05 noir ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
Nov 13 22:15:05 noir ehci_hcd 0000:00:1d.7: PCI INT D -> Link[LNKH] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir ehci_hcd 0000:00:1d.7: setting latency timer to 64
Nov 13 22:15:05 noir pci 0000:00:1e.0: setting latency timer to 64
Nov 13 22:15:05 noir ata_piix 0000:00:1f.1: restoring config space at offset 0x1 (was 0x2800003, writing 0x2800007)
Nov 13 22:15:05 noir ata_piix 0000:00:1f.1: PCI INT A -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir ata_piix 0000:00:1f.1: setting latency timer to 64
Nov 13 22:15:05 noir Intel ICH 0000:00:1f.5: PCI INT B -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir Intel ICH 0000:00:1f.5: setting latency timer to 64
Nov 13 22:15:05 noir ata2.00: ACPI cmd ef/03:42:00:00:00:a0 filtered out
Nov 13 22:15:05 noir ata2.00: ACPI cmd ef/03:0c:00:00:00:a0 filtered out
Nov 13 22:15:05 noir ata2.00: ACPI cmd e3/00:1f:00:00:00:a0 succeeded
Nov 13 22:15:05 noir ata1.00: ACPI cmd ef/02:00:00:00:00:a0 succeeded
Nov 13 22:15:05 noir ata1.00: ACPI cmd f5/00:00:00:00:00:a0 filtered out
Nov 13 22:15:05 noir ata1.00: ACPI cmd ef/03:45:00:00:00:a0 filtered out
Nov 13 22:15:05 noir ata1.00: ACPI cmd ef/03:0c:00:00:00:a0 filtered out
Nov 13 22:15:05 noir ata2.00: ACPI cmd e3/00:02:00:00:00:a0 succeeded
Nov 13 22:15:05 noir ata2.00: configured for UDMA/33
Nov 13 22:15:05 noir ata1.00: configured for UDMA/100
Nov 13 22:15:05 noir ata1.00: configured for UDMA/100
Nov 13 22:15:05 noir ata1: EH complete
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] 117210240 512-byte hardware sectors (60012 MB)
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Write Protect is off
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] 117210240 512-byte hardware sectors (60012 MB)
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Write Protect is off
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0xf (was 0x200, writing 0x20b)
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x5 (was 0x1, writing 0x2001)
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x4 (was 0x1, writing 0x2401)
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900001)
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: PCI INT B -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir Intel ICH Modem 0000:00:1f.6: setting latency timer to 64
Nov 13 22:15:05 noir pci 0000:01:00.0: power state changed by ACPI to D0
Nov 13 22:15:05 noir pci 0000:01:00.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0xf (was 0xff0100, writing 0xff010b)
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0x6 (was 0x1, writing 0x8001)
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0x5 (was 0x0, writing 0xc0200000)
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0x4 (was 0x0, writing 0xc0220000)
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0x3 (was 0x0, writing 0x4008)
Nov 13 22:15:05 noir e1000 0000:02:01.0: restoring config space at offset 0x1 (was 0x2300000, writing 0x2300117)
Nov 13 22:15:05 noir e1000 0000:02:01.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir eth1: Coming out of suspend...
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: enabling device (0000 -> 0002)
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: restoring config space at offset 0xf (was 0x18030100, writing 0x1803010b)
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: restoring config space at offset 0x4 (was 0x0, writing 0xc0214000)
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: restoring config space at offset 0x3 (was 0x0, writing 0x4008)
Nov 13 22:15:05 noir ipw2200 0000:02:02.0: restoring config space at offset 0x1 (was 0x2900002, writing 0x2900116)
Nov 13 22:15:05 noir serial 00:0a: activated
Nov 13 22:15:05 noir parport_pc 00:0b: activated
Nov 13 22:15:05 noir sd 0:0:0:0: [sda] Starting disk
Nov 13 22:15:05 noir PM: Cannot find swap device, try swapon -a.
Nov 13 22:15:05 noir Restarting tasks ... done.
Nov 13 22:15:07 noir agpgart-intel 0000:00:00.0: AGP 2.0 bridge
Nov 13 22:15:07 noir agpgart-intel 0000:00:00.0: putting AGP V2 device into 4x mode
Nov 13 22:15:07 noir pci 0000:01:00.0: putting AGP V2 device into 4x mode
Nov 13 22:15:07 noir [drm] Loading R100 Microcode
Nov 13 22:15:08 noir evdev.c(EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See [url]http://userweb.kernel.org/~dtor/eviocgbit-bug.html[/url]

Beve Stuscemi
Jun 6, 2001




I have a stupid easy Ubuntu question.

I'm running fog (Free Opensource Ghost) on an ubuntu machine. I finally ran out of space on the hard drive for images, so I attached an external USB drive and formatted it as EXT3. I then copied the images folder over from the main hard drive to the external one, and directed the fog software to the new directory.

Well, apparently the permissions didnt come over with the folders, and I get access denied everywhere. when I try to use the imaging software.

If its as simple as recopying the files with permissions attached, how do I do that?

Or, if I need to reassign permissions, how can I find out if there is a specific fog user, and how can I copy the permissions for it from the old folder to the new one?

covener
Jan 10, 2004

You know, for kids!

Phat_Albert posted:

mple as recopying the files with permissions attached, how do I do that?

Or, if I need to reassign permissions, how can I find out if there is a specific fog user, and how can I copy the permissions for it from the old folder to the new one?

chmod and chown both take a --reference=file but that's overkill if you're just recovering a set of homogenous files -- you should be able to eye up the owner/group and unix perms and fix them up directly.

hard to argue that world-readable isn't okay for the images seeing as how they're already on removable media.

Beve Stuscemi
Jun 6, 2001




How do I set them as world readable/writable?

Modern Pragmatist
Aug 20, 2008

Phat_Albert posted:

How do I set them as world readable/writable?

code:
sudo chmod o+rw filename
Edit: I just realized that you may be asking how to get to "filename" on the external drive?

If so, you can check in /mount

if you don't see it there, then you can do this:

code:
sudo mkdir /mount/usb
then

code:
mount /dev/sdb1 /mount/usb
Assuming that your external drive is represented by /dev/sdb1

If it isn't, then you can use:

code:
dmesg | more
and near the end it will have info on the mount point for your USB drive

you could then chmod your files as above:

code:
sudo chmod o+rw /mount/usb/filename

Modern Pragmatist fucked around with this message at 21:13 on Nov 14, 2008

other people
Jun 27, 2004
Associate Christ
GTK File chooser dialogue boxes recently started displaying thumbnails. They do this even in list view where the thumbnails are maybe 10x10 pixels. Really useful!

Anyway, I would love to turn off these thumbnails. Is there some way to do this? On directories with lots of images the thumbnail generation will sometimes stop all other activity for ten seconds or more.

deong
Jun 13, 2001

I'll see you in heck!

Kaluza-Klein posted:

GTK File chooser dialogue boxes recently started displaying thumbnails. They do this even in list view where the thumbnails are maybe 10x10 pixels. Really useful!

Anyway, I would love to turn off these thumbnails. Is there some way to do this? On directories with lots of images the thumbnail generation will sometimes stop all other activity for ten seconds or more.

From within Nautilus;
Edit>Preferences>Preview>Thumbnails
Think this will take care of it.

Jmcrofts
Jan 7, 2008

just chillin' in the club
Lipstick Apathy
I've installed Ubuntu on my laptop (MSI Wind), but apparently there aren't working wireless drivers for the original card, so I think I'm just going to wipe the ubuntu partition and go back to XP.

I'm dual-booting right now, so what's the cleanest way to just clear out the partition without messing up the boot menu or anything? I'm kind of new to the whole linux thing, so feel free to talk to me like a baby.

other people
Jun 27, 2004
Associate Christ

deong posted:

From within Nautilus;
Edit>Preferences>Preview>Thumbnails
Think this will take care of it.

Huh? I don't have nautilus.

TesticledRat
Mar 24, 2003
Great news, adobe is finally creating a flash player specifically for 64bit linux!

http://news.cnet.com/8301-1001_3-10097931-92.html?part=rss&subj=news&tag=2547-1_3-0-5

Maybe now I won't have to reboot firefox everytime flash breaks and i get a grey box :(

er0k
Nov 21, 2002

i like ham.
I have a bunch of files named publish.php within subdirs. I need to append a line at the end of each file. I thought I could do it with find and echo like this:

code:
find . -name publish.php -exec echo "<? include('path/to/file.php'); ?>" >> '{}' \;
but that doesn't work. What am I doing wrong?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

er0k posted:

I have a bunch of files named publish.php within subdirs. I need to append a line at the end of each file. I thought I could do it with find and echo like this:

code:
find . -name publish.php -exec echo "<? include('path/to/file.php'); ?>" >> '{}' \;
but that doesn't work. What am I doing wrong?

I think you need to escape that stuff in the quotes.

er0k
Nov 21, 2002

i like ham.

Harokey posted:

I think you need to escape that stuff in the quotes.

well it works for the most part, except instead of appending to the files it finds, it just goes to a file named {}

even if I do echo "hello" the behavior is the same, so I don't think that's it

Eyecannon
Mar 13, 2003

you are what you excrete

TesticledRat posted:

Great news, adobe is finally creating a flash player specifically for 64bit linux!

http://news.cnet.com/8301-1001_3-10097931-92.html?part=rss&subj=news&tag=2547-1_3-0-5

Maybe now I won't have to reboot firefox everytime flash breaks and i get a grey box :(

loving finally none of that wrapper BS. Yeah, Adobe, some people actually run 64bit OS.

Greed is eternal
Jun 8, 2008

er0k posted:

but that doesn't work. What am I doing wrong?

I don't think you can do that. The arguments passed after the command are interpreted as arguments to -exec command. As far as I understand it find just forks and exec and don't spawn any shell.

The Remote Viewer
Jul 9, 2001
Is there any way to get wma streaming working under 64 bit Ubuntu?

er0k
Nov 21, 2002

i like ham.

trekdanne posted:

I don't think you can do that. The arguments passed after the command are interpreted as arguments to -exec command. As far as I understand it find just forks and exec and don't spawn any shell.

any other suggestions then? I tried using tee instead of echo, tried using xargs with find as well, I can't get anything to work :(

jdonz
Jan 4, 2004

er0k posted:

any other suggestions then? I tried using tee instead of echo, tried using xargs with find as well, I can't get anything to work :(

Probably a bad idea, but:
code:
updatedb
for i in $( locate publish.php ); do
echo "<? include('path/to/file.php'); ?>" >> $i
done
Not tested, try at your own risk.

Greed is eternal
Jun 8, 2008
code:
while read f
 do echo "blah" >> "$f" 
done < <(find . -name asdf.php) 
you can enter it as a line if you squish it I guess

edit:
for completeness, something like this might also work:
code:
find . -exec sh -c "echo '<? include('\'path/to/file.php\''); ?>' >> {}" \;

Greed is eternal fucked around with this message at 23:10 on Nov 17, 2008

er0k
Nov 21, 2002

i like ham.
thanks guys, I got some more help and this is what I ended up using:

code:
find . -name publish.php | while read a ; do echo "<? include('path/to/file.php'); ?>" >> ${a} ; done

Chuu
Sep 11, 2004

Grimey Drawer
I'm trying to run a program. I get the following error:

code:
error while loading shared libraries: libcppunit-1.12.so.0: cannot open shared object file: No such file or directory
Ok, no big deal, let me just add the directory it's in to LD_LIBRARY_PATH.

Still not working. I try adding that directory to my path.

Still not working. I copy the .so.0 file directly to the same folder as the executable.

I do a ls, copying and pasting the name just in case I made a really stupid typo.

It *STILL* can't find the library. What's going on? How do I fix this?

covener
Jan 10, 2004

You know, for kids!

Chuu posted:

I'm trying to run a program. I get the following error:

code:
error while loading shared libraries: libcppunit-1.12.so.0: cannot open shared object file: No such file or directory
Ok, no big deal, let me just add the directory it's in to LD_LIBRARY_PATH.

Still not working. I try adding that directory to my path.

Still not working. I copy the .so.0 file directly to the same folder as the executable.

I do a ls, copying and pasting the name just in case I made a really stupid typo.

It *STILL* can't find the library. What's going on? How do I fix this?

Is your executable and shared object the same architecture (/usr/bin/file)? Try setting LD_DEBUG=all and paging through the output. Invoking your app under sudo and dropping LD_LIBRARY_PATH?

Note that PATH and working directory attempts are unlikely to work so might want to triple-check your LD_LIBRARY_PATH attempt.

spiritual bypass
Feb 19, 2008

Grimey Drawer

Chuu posted:

I'm trying to run a program. I get the following error:

code:
error while loading shared libraries: libcppunit-1.12.so.0: cannot open shared object file: No such file or directory
Ok, no big deal, let me just add the directory it's in to LD_LIBRARY_PATH.

Still not working. I try adding that directory to my path.

Still not working. I copy the .so.0 file directly to the same folder as the executable.

I do a ls, copying and pasting the name just in case I made a really stupid typo.

It *STILL* can't find the library. What's going on? How do I fix this?

I think for your LD_LIBRARY_PATH to be updated, you need to logout and login again. This may involve killing the X server.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

royallthefourth posted:

I think for your LD_LIBRARY_PATH to be updated, you need to logout and login again. This may involve killing the X server.

Not true at all.

Gumball Dad
Apr 9, 2007

Wanna meet that dad
I have 4 name servers and on one of the slaves, my log files are filling up with this error:

ntpd[2696]: sendto([internal ip adress]) (fd=20): Invalid argument

It is always the same IP, and only on this name server. A quick google revealed that the error can sometimes happen if the connection goes down and comes back up. Ntpd will still think the connection is down and error out forever. I saw a post somewhere else saying that someone fixed it by having a cron job run every hour that restarts ntpd. What do you all think? Any more information on what this error means? What can I do to get it out of the log files and fix it?

Kalimar
Mar 20, 2006

I'm new to fdisk and I'm trying to set it to where the 1st partition (sda1) is my main and sda2 is my swap, problem is, the hard drive as a whole is 160 gigs and fdisk won't take G and won't recognize 159.4 in M.

E: Nevermind, I realized it's counted in parts, not capacity.

Kalimar fucked around with this message at 05:37 on Nov 20, 2008

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Gumball Dad posted:

I have 4 name servers and on one of the slaves, my log files are filling up with this error:

ntpd[2696]: sendto([internal ip adress]) (fd=20): Invalid argument

It is always the same IP, and only on this name server. A quick google revealed that the error can sometimes happen if the connection goes down and comes back up. Ntpd will still think the connection is down and error out forever. I saw a post somewhere else saying that someone fixed it by having a cron job run every hour that restarts ntpd. What do you all think? Any more information on what this error means? What can I do to get it out of the log files and fix it?
Restarting NTP every hour is just masking the problem.

The first thing to check is that your connection actually is solid. Run a one sec interval ping to the server until you see the error again, see if the problem is simple connectivity.

Check that the server and client's forward and reverse DNS is also resolving each other correctly.

Chuu
Sep 11, 2004

Grimey Drawer
Thanks for the replies, the solution turned out to be really stupid. I set the LD_LIBRARY_PATH var, but didn't export it.

tripwire
Nov 19, 2004

        ghost flow
Not really a question but a kind of funny occurrence: I used amarok before to organize and rename some mp3s on an NTFS partition in bulk. Theres a couple of songs that had question marks in the song title and amarok of course threw the question into the filename, causing windows to be completely unable to interact with the files as ? is a special character disallowed in filenames. Pretty funny glitch to come up. I wonder who you would file the bug report with, (if anyone): the ntfs driver people for allowing invalid filenames to be written on an ntfs partition in the first place, or the amarok people for letting the organizer rename files without respecting which characters aren't allowed in filenames for that file system?

Queen of Beans
Jun 15, 2007
I'm still new to all this stuff, so it is probable that I have a huge misunderstanding, so please bear with me:

I am running Ubuntu 8.10, and I want to use my home PC to serve a simple text file using apache. I have apache installed and going to [url]http://[/url][mydomain.com]/ results in me seeing apache's "It works!" page.

So now I want to put a text file in apache's default directory, so I poked about and I found /var/www - which sounded right to me, so I did this:

code:
hobofood@hobofood-desktop:~$ ls > test.txt
hobofood@hobofood-desktop:~$ sudo ln -s test.txt /var/www/test.txt
Now, if I go to [url]http://[/url][mydomain.com]/test.txt then I get a 403 error

What do I have to do to be able to see this file? Is this an apache configuration thing, or is it a linux user permissions issue?

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

hobofood posted:

I'm still new to all this stuff, so it is probable that I have a huge misunderstanding, so please bear with me:

I am running Ubuntu 8.10, and I want to use my home PC to serve a simple text file using apache. I have apache installed and going to [url]http://[/url][mydomain.com]/ results in me seeing apache's "It works!" page.

So now I want to put a text file in apache's default directory, so I poked about and I found /var/www - which sounded right to me, so I did this:

code:
hobofood@hobofood-desktop:~$ ls > test.txt
hobofood@hobofood-desktop:~$ sudo ln -s test.txt /var/www/test.txt
Now, if I go to [url]http://[/url][mydomain.com]/test.txt then I get a 403 error

What do I have to do to be able to see this file? Is this an apache configuration thing, or is it a linux user permissions issue?

Find httpd.conf and see what your actual document root is.

It could be a permissions issue, usually Apache has it's own user so check that that user is able to read the file.

Queen of Beans
Jun 15, 2007

Mashi posted:

Find httpd.conf and see what your actual document root is.

It could be a permissions issue, usually Apache has it's own user so check that that user is able to read the file.

How can I check if the Apache user has access to anything?

code:
hobofood@hobofood-desktop:/etc/apache2$ cat httpd.conf
hobofood@hobofood-desktop:/etc/apache2$
but apache2.conf has the lines
code:
# Include all the user configurations:
Include /etc/apache2/httpd.conf

Greed is eternal
Jun 8, 2008
Have you activated FollowSymLinks in that directory?

Adbot
ADBOT LOVES YOU

Queen of Beans
Jun 15, 2007

trekdanne posted:

Have you activated FollowSymLinks in that directory?

Sorry to be so ignorant, but where would I do that?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply