The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
file size different in unix and windows the_learner UNIX for Dummies Questions & Answers 6 08-03-2007 06:51 AM
Perl Application Migration From MPE To Unix tc.omkumar Shell Programming and Scripting 0 03-29-2006 05:25 AM
SCO UNIX to Linux migration vickey Shell Programming and Scripting 3 03-15-2005 06:40 AM
Migration to Unix Kukur UNIX for Dummies Questions & Answers 1 10-14-2004 12:54 PM
Problems with migration from Reliant Unix to Solaris MS-No SUN Solaris 2 08-27-2004 04:21 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-02-2008
Registered User
 

Join Date: Jul 2008
Posts: 1
file migration windows -> unix

I've spent all of my career on windows boxes and maybe 30 secs here an there with unix.

Now I find myself with a project of migrating web files (html, swf, etc) from windows to unix. I know that unix is case sensitive and there can be no spaces in file/folder names.

What else do I need to be on the look out for? Is there documentation or a utility to help somewhere?

Thanks all!
Reply With Quote
Forum Sponsor
  #2  
Old 07-02-2008
Registered User
 

Join Date: Jul 2008
Posts: 24
> I've spent all of my career on windows boxes and maybe 30 secs here an there with unix.

First of all: Congratulations!
I am in an opposite situation: changed work recently and moved to windows-based environment. I feel like somone cut off my hands, you'll probably understand me very well :-)

Anyway let's get down to business.
Regarding all flavours of text files (including html files of course) there is a mojor difference that you should be aware off:
the famous "newline" character.
Windows writes newlines as CRLF (two characters: carriage-return and line-feed) while UNIX writes newlines simply as LF.

So when'll you copy files from windows system expect to see an extra character at the end of line (often seen as "^M").
The good news: there are 1001 ways to remove that unnecesary character: one of the best ways is to use dos2unix command.

There are other ways to get rid of this character: from manually editing the file (in fact it's just a character that has to be removed) to using simple perl one-liners (that is one-line long scripts) like:
perl -i -pe 's/\r//g' file.
There are also options for zip that fix newline issue depending on the target system, that is system where you intend tu un-zip.

I hope I was helpful at leas a little. bye
Reply With Quote
  #3  
Old 07-03-2008
Registered User
 

Join Date: Jun 2008
Location: Scotland
Posts: 120
Some Unix filesystems can handle filenames that contain spaces.
dos2unix is a utility that might be available to you which does the line ending thing.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0