Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Automatically Resolving Windows Paths To Linux
post Sep 5 2003, 10:55 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 5-September 03
Member No.: 1,394

My problem needs AUTOMATIC resolution of WINDOWS paths (with drive letters et al) to pre-configured LINUX paths on RedHat 9.0 machines. Specifically, I have a third party application (running on both Windows and Linux platforms), which generates data files with embedded file paths corresponding to the particular OS file naming system. Consider the following example. Say, I create a data file using my application (lets call it X) on Windows XP. The contents of the data file will look as follows:

#Data file for application X
exec ""

Now, I need to process this same data file on a RedHat Linux 9.0 box. The problem is that Linux does not use drive letters, it is case sensitive and the slashes are also different. So, the embedded file path won't be resolved correctly by Linux. This is the crux of my problem.

So, what I am looking for is some Linux app ,which can be configured to maintain a table of Windows path mappings to their corresponding Linux counterparts. It would look something like this:

C:SAMPLEexample1.txt /tmp/example1.txt
D:example2.txt /tmp/example2.txt

This app can then inform the OS of the configured drive mappings. SO, whenever the RH 9.0 OS encounters the Windows style file paths it looks up the table (might need a kernel mod for doing that) and resolves it to the correct Linux file path (provided it has been configured in the table).

Is there any such Linux app out there? I can solve my problem by writing scripts to read through the entire data file and perform the file path replacement wherever necessary. However, the problem is that the data files are huge (> 100 MB) and therefore the aforementioned solution becomes really expensive.

Any help in this regard will be highly appreciated.

Thanks & Regards,
Go to the top of the page
+Quote Post
post Sep 7 2003, 06:45 PM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,807
Joined: 23-January 03
Member No.: 360

It is probably possible but not realistic. IMHO it really is an application problem.

What do you mean by >100mb? Is the file < 200mb <500mb < 1gb? If you have a script that works then you could write a c program that would be faster. (Depends on file format of course). Just open the data file, move to the end of file less the last line, change it, save it and your done.

How does the script solution become expensive? It does take a lot of time to loop through files but the computer is doing all of the work.

Do you have the source code to the application?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 20th July 2018 - 03:58 AM