LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2010, 06:39 AM   #1
vaalu
Member
 
Registered: Jun 2007
Posts: 54

Rep: Reputation: 15
executing linux command over a network!!!!


hi all,

I have a some c source code files that i have to copy to linux machine from a windows machine over a network. This source code folder has to be copied into a particular directory structure in the linux system at the other end. After copying the file into the appropriate folder in the linux server i have to instruct the linux machine to make(using the make file that is there with the c files) this source code from the windows machine. Does anyone have any idea in regard to how this can be implemented?? i am trying to have a gui client that has the above mentioned options(copying and inserting the c files into the appropriate directory and then for making the files and getting the executable.) But i have no idea whether this can be achieved or not or where to start to implement this. Could any one help in regard to this???

Thanking you in anticipation...
 
Old 08-06-2010, 06:51 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
The easiest way to do this is to install PuTTY on the Windows box (see http://www.chiark.greenend.org.uk/~s.../download.html). You do not need to install anything on the Linux side, it will already be there.

What that does is lets you connect to your Linux machine, transfer files and directories back and forth (you would probably want to use scp, secure copy (remote file copy program). You would then be able to use ssh, OpenSSH SSH client (remote login program) to do the work on the Linux machine from a terminal window on the Windows machine.

This is a pretty common way to get Linux connectivity from Windows.

Hope this helps some.
 
Old 08-06-2010, 06:54 AM   #3
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
If you have to do the copying from the Windows machine to the Linux machine, I would probably just use FTP, but I'm sure there are other methods. Then I would use Putty or something similar to SSH into your Linux box to run whatever commands you need to run.
 
Old 08-06-2010, 07:09 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Another option to transfer the files is to copy them to a network share, and then ssh into the Linux machine, and from there copy them from the share. If the destination on the Linux host is shared (using samba) you could use explorer to copy the files as you normally would.
---
Windows text files contain CRLF pairs at the end of lines instead of \n. That can cause problems in Linux. One example is Make files. Another example is bash scripts. If you don't realize the source of the files, it is a hard problem to find, because these characters are invisible. If these files were created in Windows, you will need to remove the \r character. The linux host probably has a program installed that can do this called dos2unix.

dos2unix filename

If not you can use the sed command to remove them:
sed -i 's/\r//g' filename
the filename(s) can contain wildcard to convert several files at once:
sed -i 's/\r//g' *.c *.h

You can check if a file has this problem using the file command:
file filename
If is says ASCII text, it is OK. If it says ASCII text with CRLF pairs.
 
  


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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM
executing command on another treminal vineeth789 Programming 2 01-22-2006 03:50 PM
executing a command at a certain time pantera Programming 6 04-05-2005 12:22 PM
Executing command lines in C/C++ ReverseLogic Programming 2 05-28-2002 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:32 PM.

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