Windows users script feedback

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Windows users script feedback

Post#1 by brokenman » 12 Oct 2012, 02:26

If you have a partition with windows installed please run the attached script after booting into Porteus and let me know the console output. It simply searches for all partitions with windows installed. I am looking for the fastest way to find windows partitions.

Thanks in advance to those that help.

Code: Select all

#!/bin/bash

get_windows_drives(){
for drive in `blkid|egrep "ntfs|vfat"|cut -d: -f1`; do
  if [[ `grep $drive /proc/mounts` ]]; then
    find `sed 's@dev@mnt@g' <<<$drive` -maxdepth 3 -type d -name "*ystem32" 2>/dev/null
      else
    echo "$drive is not mounted!"
  fi
done
}

time get_windows_drives
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
wread
Module Guard
Module Guard
Posts: 1255
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v5.0-kde-64 bits
Location: Santo Domingo
Contact:

Re: Windows users script feedback

Post#2 by wread » 12 Oct 2012, 10:46

Hi, Jay!
Here is what I get:

root@porteus:~# ./get_windows_drives
/mnt/sda1/WINDOWS/system32
/mnt/sda1/WORKSSETUP/System32

real 0m6.568s
user 0m0.141s
sys 0m0.068s
root@porteus:~#

This is an old Toshiba Satellite with 1.4 Mz Intel Celeron.

Regards!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Iapetus
White ninja
White ninja
Posts: 18
Joined: 13 Aug 2012, 16:46
Location: USA

Re: Windows users script feedback

Post#3 by Iapetus » 13 Oct 2012, 16:48

Code: Select all

/mnt/sda1/WINDOWS/system32

real	0m17.043s
user	0m0.312s
sys	0m0.094s
I'm on a 2.4 ghz dual core processor with 2 GB RAM, but still slower than wread...

When I run this a second time, however, I get this:

Code: Select all

/mnt/sda1/WINDOWS/system32

real	0m0.635s
user	0m0.216s
sys	0m0.038s
So perhaps it's taking me a while for my drive to wake up the first time. Maybe you could wake the drives up at the start of the script, so they're ready when you need to run your search?

Post Reply