linux ,±àдһ¸ö³ÌÐò,°ÑÒ»¸öÎļþ¸´ÖƵ½ÁíÒ»¸öÎļþÉÏ
¼´ÊµÏÖ¼òµ¥µÄcopy¹¦ÄÜ
ÒªÇó:Ö»Óà open() read() write() ºÍclose()ϵͳµ÷ÓÃ.
cat file1 >> file2 £¿
open()Á¬¸öÎļþ£¬read()ÆäÖÐÒ»¸öÄÚÈÝ£¬write()µ½ÁíÍâÒ»¸öÎļþÉÏ£¬×îºóclose()µô¡£
Äܲ»ÄÜÓÃlseekº¯Êý£¿
C/C++ code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define BUF_SIZE 1024*8
int main()
{
int fds, fdd;
char buf[BUF_SIZE];
size_t hasread = 0;
fds = open("filea", O_RDONLY);
fdd = open("fileb", O_WRONLY, O_CREAT);
if(fds && fdd)
{
while((hasread = read(fds, buf, sizeof(buf))) > 0)
{
write(fdd, buf, hasread);
}
close(fds);
close(fdd);
}
²»ºÃÒâ˼£¬ÉÙcopy°ë±ß¡°}¡±
·Ç³£ºÃ
Ïà¹ØÎÊ´ð£º
ÎÒÖ®Ç°ÖÆ×÷µÄlinux×Ô¶¯°²×°isoÒѾ³É¹¦ÁË£¬ÏÖÔÚÏë¶ÔÆä½øÐÐһЩ¶¨ÖÆÐ޸쬱ÈÈ磬¸ü¸ÄgrubͼƬµÈ¡£
ÎÒÔÚks.cfgµÄ%post¶ÎÀïÃæÊÇÕâÑùдµÄ£º
%post --nochroot
# Move the contents of the tar into their new locati ......
linux Ͻø³Ì´´½¨¡£
ʹÓÃvfork() º¯Êý´´½¨ÁË×Ó½ø³Ìºó£¬×Ó½ø³ÌÏÈÐÐÖ´ÐУ¬ÔÚ×Ó½ø³Ìµ÷ÓÃexit»òexec֮ǰ¸¸½ø³Ì´¦ÓÚʲô״̬£¿£¿
²»ÖªµÀ£»Ê×ÏÈδ±ØÊÇ×Ó½ø³ÌÏÈÖ´ÐУ»µÚ2¸¸½ø³ÌÒ²´¦ÓÚÖ´ÐÐ״̬£»ÖÁÓÚ¸¸½ø³Ìµ½µ××öʲô£»¿´´ ......
Çë½Ì£º
ÔÚ LINUXϵͳÖеÄORACLEÔõôн¨±í¿Õ¼ä£¿
Ò»ÑùµÄÃüÁî°¡¡£Èç¹ûûÓÃomfµÄ»°£¬Äã¾ÍÖ¸¶¨Ï·¾¶ºÍÊý¾ÝÎļþÃû¾ÍÐÐÁË¡£
create tablespace xxx datafile '/u01/..../aaa.dbf' size 10m;
CREATE TA ......
Á½¸öÎļþ1.PC£¬1.inc
1.PCÓвÙ×÷oracleÊý¾Ý¿âµÄ ,1.incÒ²ÓвÙ×÷oracleÊý¾Ý¿â
ÔÚÆäËûÊý¾ÝÖÐÈçinformix ÖÐ$include 1.inc¾Í¿ÉÒÔʹÓÃÁË
ÔÚORACLEÊý¾Ý¿âÖØ $include 1.inc²»¿ÉÓà EXEC SQL include 1.incÒ²²»¿É ......