LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-27-2015, 07:17 AM   #1
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102
Blog Entries: 1

Rep: Reputation: Disabled
Question Symbolic link issue for a log file


Working on Unix + Perl scripting, we had an issue with processing and storing the log file on the local folder which causes lot of burden on the server as we have lot of such log files.

Right now, we are processing the log file @ /var/tmp path. Which saves some amount of time and the copies the file to our local folder which takes some more time.

One thought in my mind was that what if I could create a symbolic link for the /var/tmp file instead of copying it helps in reducing the log file time.

Tried with the above idea and had seen issues like content was not visible in Unix and not able to open in WINSCP (short cut is shown-up in red mark). Surprised to see this issue !

One more though is that what if we process all the log data in an array and move this array content to a local file.

We have different servers to do our work. To make my idea work, what kind of setting we need ?

Not sure of the side effects of using the symbolic link.

are there any alternate ways to resolve the issue ?

Last edited by rpittala; 11-27-2015 at 07:21 AM. Reason: sentence correction
 
Old 11-27-2015, 08:53 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Files do caching already, so your array idea will not help.

You need to actually show what you tried to do and what error you got if you want help fixing it.
 
Old 11-27-2015, 09:44 AM   #3
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
smallpond,

Let me explain you a little more here, when I say log file it means a kind of print statements to collect the pass/fail info and if I run the make file the logs/print-statements corresponding to the make file steps. It could be anything a print statement stored in a log file or redirected to the log file.

Coming to your question. What I have tried ?

I made a symbolic link to the log file(/var/tmp/ which consumes less time to process and store in the path and I am okay with it) and then copying the file to local path.

what is the error message ?

Soft link file created by me is not showing any content in Unix. When I tried to see in winscp the file in red and not able to open it.

Last edited by rpittala; 11-27-2015 at 09:47 AM. Reason: statement correction
 
Old 11-27-2015, 10:00 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
How many computers are you talking about? You want to create a symlink from one computer to another?
 
Old 11-27-2015, 10:41 AM   #5
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Yes,code executes on different servers and the /var/tmp path log file is stored on the GPS(General Purpose Server)and then copied.
 
Old 11-27-2015, 12:30 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
winscp does not follow symbolic links to directories.
 
Old 11-28-2015, 02:26 AM   #7
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Unix follows Symbolic links right ? If it works with Unix that`s fine for me.

Last edited by rpittala; 11-28-2015 at 08:25 AM.
 
Old 11-30-2015, 11:11 AM   #8
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Yes, Uinx follows the symolic links and if the link is broken some where in the code/script Winscp would not support the broken link Where as in case of Unix it provides the output.

Thank you for your valuable suggestion.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can I make a symbolic link that is dynamic link->$HOME/file? croog Linux - General 4 10-14-2012 07:55 PM
creating symbolic link issue? prasad_nyros Linux - Newbie 1 05-08-2011 06:50 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
How to remove a symbolic link without deleting the file rhbegin Fedora 4 10-10-2007 10:38 AM
Checking whether a file is symbolic link or not rajesh_b Programming 3 01-06-2005 10:07 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration