Windows和Linux间文本文件格式转换
问题:在Linux下正常换行的文字,到了Windows下后,不再换行。
在Windows下换行时,有两个字符:回车(\r)和换行(\n)。但在Linux下,只有一个换行(\n)
可使用unix2dos和dos2unix命令进行格式的转换:
参数:
-k 保持输出文件和输入文件的日期时间戳不变
-o file 默认模式 . 将file转换,并输出到file
-n infile outfile 新模式. 转换infile, 并输出到outfile
1. unix2dos
假设用vi新建一文本文件,输入123456
[root@centos test]# ls -l a.txt
-rw-r--r-- 1 root root 7 Jan 7 21:31 a.txt
[root@centos test]# hexdump -c a.txt
0000000 1 2 3 4 5 6 \n
0000007
[root@centos test]# unix2dos -n a.txt b.txt
unix2dos: converting file a.txt to file b.txt in DOS format ...
[root@centos test]# ls -l
total 8
-rw-r--r-- 1 root root 7 Jan 7 21:31 a.txt
-rw------- 1 root root 8 Jan 7 21:34 b.txt
[root@centos test]# hexdump -c a.txt
0000000 1 2 3 4 5 6 \n
0000007
[root@centos test]# hexdump -c b.txt
0000000 1 2 3 4 5 6 \r \n
0000008
b.txt是转换后的DOS下的文件
2. dos2unix
[root@centos test]# dos2unix -n b.txt c.txt
dos2unix: converting file b.txt to file c.txt in UNIX format ...
[root@centos test]# ls -l
total 12
-rw-r--r-- 1 root root 7 Jan 7 21:31 a.txt
-rw------- 1 root root 8 Jan 7 21:34 b.txt
-rw------- 1 root root 7 Jan 7 21:38 c.txt
[root@centos test]# hexdump -c b.txt
0000000 1 2 3 4 5 6 \r \n
0000008
[root@centos test]# hexdump -c c.txt
0000000 1 2 3 4 5 6 \n
0000007
c.txt是转换后unix下的文本文件
相关文档:
先root打补丁:p3006854_9204_linux.zip
再设oracle环境变量
安装
安装结束建库之前需要打的补丁有:
p2617419_220_GENERIC.zip
p3119415_9204_linux.zip
具体参考这篇文章:
Redhat Enterprise Linux 4安装oracle
关键字: redhat el4 oracle 安装
一. 安装准备
1. as4安装完后,需要检查下列软件 ......
安装telnet-server…,必须先装xinetd
安装telnet服务:rpm -ihv telnet-server…
启动:service xinetd start
&nb ......
自2.1内核开发版以来,linux就引入了正式的链表实现,采用的是双向循环链表。因此,在开发过程中应该使用这些已有的接口。
1. 定义
链表结构体定义在文件<linux/list.h>中。
struct list_head {
struct list_head *next;
&n ......
随着现代计算机技术的飞速发展和互联网技术的广泛应用,从pc时代过渡到了以个人数字助理、手持个人电脑和信息家电为代表的3c(计算机、通信、消费电
子)一体的后pc时代。后pc时代里,嵌入式系统扮演了越来越重要的角色,被广泛应用于信息电器、移动计算机设备、网络设备和工控仿真等领域。嵌入式 ......
vmware三种网络连接,qemu两种网络连接实现 虚拟机<--->主机 虚拟机<--->互联网通信的方法。顺便写了下如何不重新编译整个内核支持某个功能,对系统无影响,编译速度要快于编译整个内核。如果你的XXX卡没被内核支持,又怕自己编译的内核会造成系统损坏就可以试试这个方法喽 ^_^
vm ......