Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-20-2005, 03:23 AM   #1
Registered: Jun 2005
Posts: 41

Rep: Reputation: 15
copying files from another server and printing it in local notepads

Hi all,

I have been trying to do this experiment.

I am telnetting to a remote server running on linux and doing my work. Often it requires to copy the contents of files in that server and then paste (simply do a select all , copy and then paste)it in my local file( an editor like notepad , word etc). I then take out a print out (hard copy) of this file and read this file according to my own sweet pace. This I do , because often it is pretty cumbersome to read the whole of the file from the window specially when some of them have around 10,000 lines of codes.

While doing this I face 2 difficulties viz.

1.) Sometimes I miss some of the sections because I accidentally scroll down too much while reading from the server copy of the file.

2.) In notepad I have to manually maintain the cursor position to the next line before a fresh paste.I am trying to elaborate the second problem.Say I have copied 500 lines from the server file and copied the same into my local file.Now I have to manually go and place the cursor position so that the next time I do a paste the pasting is starts from desired position, otherwise it leaves some space and then prints.

Now I am trying to write a program ( a shell script) that will fetch the contents from the server file and print it in my local file. I know how to do this in server file.Say for eg if I do the following

cat file_name > report_file

then report file will contain the contents of file_name.But how can I do this if want to print in my local file ie I want report_file as a local file.

Please help me with the programming concepts reqd to write the above shell script.It will be really helpful

Thanks and Warm Regards
Old 09-20-2005, 03:40 AM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
Can't you just transfer the file through SCP / SFTP or something? Get WinSCP if you use Windows.

(P.S. Why do you still use telnet? Telnet has no security and has long been replaced with SSH for remote login connections.)

Also, do you know that you can page through a file a page at a time with "less"?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Server, Local Printing, on Windows coolamit78 General 0 06-11-2005 04:01 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
Printing to a local printer via SSH provo1234 Linux - Networking 1 12-20-2004 01:22 PM
client can't copy files to local machine through vsftpd server on RH9 tree_buddy Linux - Networking 7 09-15-2003 10:54 AM
Restrict Printing on Local Network? franticbob Linux - Networking 3 08-01-2003 03:06 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:59 PM.

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