transfering directories from windows - Help

This is a discussion on transfering directories from windows - Help ; I need to transfer a multi level directory from a fat32 file system to a
linux native (ext3) file system.
I have a dual boot windows98 mandrake9 system and I'm migrating to using
more of linux as I get more ...

transfering directories from windows

I need to transfer a multi level directory from a fat32 file system to a
linux native (ext3) file system.

I have a dual boot windows98 mandrake9 system and I'm migrating to using
more of linux as I get more familiar with it. I have recently moved all my
word processing and spredsheet files from my windows partition to my linux
home directory. As expected everything comes up as executable. I could go
through all the directories and reset the file permisions manually but that
would take a long time. I tried to recursivly unset the execute flag with:
chmod -R a-x *
but this makes the directories unaccessable (and fails to recurse because of
that). Is there an easier way to do this?

Re: transfering directories from windows

Dan Vale wrote:
> I need to transfer a multi level directory from a fat32 file system to a
> linux native (ext3) file system.
>
> I have a dual boot windows98 mandrake9 system and I'm migrating to using
> more of linux as I get more familiar with it. I have recently moved all my
> word processing and spredsheet files from my windows partition to my linux
> home directory. As expected everything comes up as executable. I could go
> through all the directories and reset the file permisions manually but that
> would take a long time. I tried to recursivly unset the execute flag with:
> chmod -R a-x *
> but this makes the directories unaccessable (and fails to recurse because of
> that). Is there an easier way to do this?

From the same directory you are trying the chmod command,
you could do something like this:

find . -type f|sed s/./"chmod 644 ."/>fixmodes.sh

I think there is a way in bash to execute on the fly, but
can't remember it now.

|sed s/./"chmod 644 ."/
Output of find is piped into sed. sed is a stream editor.
Does a substitution of the first occurance of '.' with
'chmod 644 .'. This makes a valid chmod command line.
>fixmodes.sh
Output of sed is redirected to the file 'fixmodes.sh'.

Then just make fixmodes.sh executable and run it with:
chmod +x fixmodes.sh
../fixmodes.sh

Re: transfering directories from windows

Dan Vale wrote:
> I need to transfer a multi level directory from a fat32 file system to a
> linux native (ext3) file system.
> As expected everything comes up as executable.

Use the appropriate mount options for vfat to avoid this.

man mount

Re: transfering directories from windows

On Mon, 29 Dec 2003 14:29:16 -0600, Kevin D. Snodgrass wrote:
> Dan Vale wrote:
>> I need to transfer a multi level directory from a fat32 file system to a
>> linux native (ext3) file system.
>>
>> I have a dual boot windows98 mandrake9 system and I'm migrating to using
>> more of linux as I get more familiar with it. I have recently moved all
>> my word processing and spredsheet files from my windows partition to my
>> linux home directory. As expected everything comes up as executable. I
>> could go through all the directories and reset the file permisions
>> manually but that would take a long time. I tried to recursivly unset
>> the execute flag with: chmod -R a-x *
>> but this makes the directories unaccessable (and fails to recurse
>> because of that). Is there an easier way to do this?
>
> From the same directory you are trying the chmod command,
> you could do something like this:
>
> find . -type f|sed s/./"chmod 644 ."/>fixmodes.sh
>
> I think there is a way in bash to execute on the fly, but can't remember
> it now.