#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<stdio.h>
#include<unistd.h>
#include<string.h>
int main()
{
int fd1,fd2;
char name1[100],name2[100];
char str[6];
int n;
printf("enter name of file to move");
scanf("%s",name1);
printf(enter new location);
scanf("%s",name2);
fd1=open(name1,O_RDONLY);
fd2=open(name2,O_WRONLY);
while(1)
{
n=read(fd1,str,sizeof(str));
printf("%s \n",str);
if(n==0)
break;
write(fd2,str,n);
}
close(fd1);
close(fd2);
unlink(name1);
}
using touch command of UNIX. syntax touch <filename> will create dummy regular file.
Unix files do not rely on extensions, therefore there is no command to find them.
an extensioin of indexed allocation
The Unix file contains which kinds of fields?
The easiest way would be: cat file1 > file2
OS-dependent.stat for unix, FindFirstFile for Windows.
There is no the system file. There are many files necessary to create a working Unix system.
Unix files can be easily transferred to windows via a network connection either by using FTP or by using Samba. Samba allows a Unix file system to be mounted/shared on a Windows system to look like a windows directory.
The host file in Unix is usually located in the /etc directory.
Unix is a text file, not a web browser. :)
Douglas W. Topham has written: 'A system V guide to UNIX and XENIX' -- subject(s): UNIX System V (Computer file), XENIX (Computer file) 'The first book of UNIX' 'UNIX and XENIX' -- subject(s): UNIX (Computer file), XENIX
Host names can be resolved by either using the /etc/hosts file or by using DNS.