0

I get an error when using a symbolic link in gnuplot:

on l: drive

plot "/j/projMainpips/Aggregate/dailyStats.txt" u 1:4 w l lw 1

warning: Skipping unreadable file "/j/projMainpips/Aggregate/dailyStats.txt"
No data in plot

The link was created as:

ln -s //xxx.yy.xx.y/Users/spence/JobsStuff/ /j

If I don't use the link, it works fine:

on h: in folder /j

plot "projMainpips/Aggregate/dailyStats.txt" u 1:4 w l lw 1

How can I enable use of symlinks in gnuplot?

Warren Young
  • 40,875
  • 8
  • 85
  • 101
ManInMoon
  • 6,795
  • 15
  • 70
  • 133

2 Answers2

2

I've tested symlinks to UNC paths under Cygwin 32, and it works here.

Are you using the Cygwin version of gnuplot? You will get such errors if you try to use the native Win32 port of gnuplot instead.

If you can open the file in a Cygwin text editor, that shows that the symlink works:

vi /j/projMainpips/Aggregate/dailyStats.txt

Another way to run into trouble here is to edit /etc/fstab to drop the cygdrive prefix. If you do that, your syntax is going to try looking for a J: system drive. You'd need to use more than a single letter to avoid this problem or revert fstab to its original form.

Warren Young
  • 40,875
  • 8
  • 85
  • 101
  • Yes - I am using native win32 port of gnuplot – ManInMoon Jun 05 '14 at 14:35
  • @ManInMoon: There's your problem, then. Cygwin emulates many POSIX mechanisms on Windows — including symlinks and [POSIX paths](http://en.wikipedia.org/wiki/Path_(computing)) — but you have to build a program under Cygwin to get those benefits. Cygwin does not — cannot, really — confer those benefits to programs not built under Cygwin. The solution is to use the Cygwin port of Gnuplot, which you can download with Cygwin's `setup.exe`. – Warren Young Jun 06 '14 at 09:54
0

When you are executing a native Windows application from Cygwin, you should use cygpath to translate paths from Unix to Windows format. You can try it with symlink too, maybe it'll work and translate the target path of the symlink to the Windows version path. I didn't try that, so I'm not sure if it works, but it's worth trying.

Example use:

# convert specified Cygwin path to the Windows path
cygpath -w ~

notepad `cygpath -w ~/test.txt`
David Ferenczy Rogožan
  • 23,966
  • 9
  • 79
  • 68