how to copy downloaded file into my source file folder (putty/unix)
I need to
"Ensure that when you download libchat.a from the VLE you have copied it to the same folder on ius as your source files. You then refer to the library (and the libraries it needs) with:
gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl"
But I have no idea what this means! (I don't even know what my "source files" are)
libchat.a is actually a zipped folder with two files in it: root() and chatlib.o (?!)
Also "You will need to include three libraries called stdio.h, string.h and chatlib.h.
You should do this by placing the following lines at the start of your program.
#include <s t d i o . h>
#include <s t r i n g . h>
#include ” c h a t l i b . h ”
The chatlib library provides the following functions that you will need for this
problem"
I have downloaded chatlib.h but I dont know how to make it work on UNIX/putty.
PUTTY isn't a UNIX the same way a TV isn't channel 3. Don't mistake the picture for the computer. PUTTY is a terminal emulator used to communicate with other systems over the internet, many of them UNIX systems, some of them not.
If you don't know what your system is, try running 'uname'.
Put the 'chatlib.h' file in the same folder as your .c files on the server. Your program will be able to find it with #include that way.
gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl
This is what you need to do in order to turn the code sourcefile.c into the program outputfile. Once you've compiled it this way, you can run it with ./outputfile
---------- Post updated at 12:09 PM ---------- Previous update was at 12:07 PM ----------
As for how to copy it into your folder, depends on how they have it set up. They probably have given you instructions on how to do so. FTP or SCP may be involved.
Worst case, you can run this in the putty window:
which will create chatlib.h with the pasted contents.
I have to copy a particular file present in a main folder having part of the file-name present in many sub-folders to a new destination preserving the name of the source "part of the main folder" and previous file-name of the output file:
Example:
From /005_0/1000/005.xxx ->... (7 Replies)
Hi,
Is there a way I can copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp?
I tried this but it just rename the file as the folder it has to be transferred at.
scp -r name@some_server:/home/user/file.txt 'somehere\home\home_dir'
Thanks. (4 Replies)
Hi All,
My requirement is as follows:
A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path.
Eg:
abc
-------
file1.txt
file2.txt
file3.txt
Output (should... (1 Reply)
Hi all...
Below is what I am trying to do:
1. Having the following folder with the files...
/source_folder/dodiddone.tar.gz
/source_folder/gowentgone.tar.gz
/source_folder/gowentgone.log
2. I need to copy and chown files with extension .tar.gz to another folder
copy... (1 Reply)
Hi All,
One job in unix server will generate .csv files daily. I need to copy the latest of these .csv file from the unix server to the shared drive/folder in windows through unix script. My shared folder will look something like
W:\some folder(for example). Could any one of you please help... (3 Replies)
#!/bin/bash
for i in {1..1536..1}
do
#find /home/test/Desktop/up111/workplace/Malware/$i/logs
for a in /home/test/Desktop/up111/workplace/Malware/$i/logs/*
do
#max=a
for b in /home/test/Desktop/up111/workplace/Malware/$i/logs/*
do
... (4 Replies)
Hi,
I have a problem.
I have some text files in a folder. The names can be like:
emp_20080307053015.dat
emp_20080306053015.dat
emp_20080305053015.dat
emp_20080304053015.dat
The date format appended is like yyyymmdd and timestamp.
What i need is i have to copy the latest file every... (3 Replies)
Hi All,
Please advise me how to make a copy of file from a list and store in one particular location?
For example , I have aaa.txt which contains as below, But, those *usg files might be randomly store in different location....
> cat aaa.txt
adc.usg
dfdjkf.usg
ugjfk.usg
And I want... (3 Replies)
Is there any way to preserve a file's create/mod date stamp when it is "put" via ftp (or even using Fetch) to a Win2K server and a SunOS 5.8 server? For example, if I copy a file with a create/mod date of "01/15/2005 3:36 PM" to my Win2K or SunOS ftp server, the date stamp will change to the... (5 Replies)