1. Linux 基础命令
Unix基础
登录和退出
登陆:可以用Neterm、SecureCRT等终端登陆工具〔192.168.25.12 常用软件下有〕或者
telnet、ftp命令。
1. telnet 远程终端访问
命令格式:telnet [hostname|IP address]
退出:ctrl+d or logout or exit
2. ftp 远程文件传输
命令格式: ftp [hostname|IP address]
a)文件传输的两种格式asc bin
ascii 将传输模式设为 ascii 模式.通常用于传送文字档.[asc]
binary 将传输模式设为 binary 模式,通常用於传送执行档,压缩档与影像档等[bin]
cd remote-directory 将远程主机上的工作目录改变
lcd [ directory ] 更改本地主机的工作目录.
ls [ remote-directory ] [ remote-file ] 列出远程主机上的文档.
get remote-file [ local-file ] 取得远方的文档.
mget remote-files 可使用通用字元一次取得多个文档.
put local-file [ remote-file] 将本地主机的文档送到远程主机.
mput local-files 可使用通用字元一次将多个文档放到远程主机上
mkdir directory-name 在远程主机创建一个目录.
prompt 更改交谈模式,若为 on 则在 mput 与 mget 时每作一个文档传输时均会询问.
quit/bye 离开 ftp .
文件系统
文件属性:
文件类型 操作权限 链接数 属主名 属组名 最后修改时间 文件或目录名
d rwxr-xr-x 3 test dba 4096 May 25 21:08 test
文件类型:
d 目录
- 普通文件
l 符号连接文件
b 数据块特别文件
c 字符特别文件
操作权限:
前三位: 文件属主权限
中间三位: 同组成员权限
最后三位: 系统其他用户的权限
r 读 w 写 x 运行 常用操作命令
1. pwd
列出当前工作路径
2. cd 目录转换,等同于 dos下cd命令
注意目录分隔符为“/”,与dos相反
命令格式:cd dirname
3. ls
-a 列出目录下的所有文件,包括以 . 开头的隐含文件。
-b 把文件名中不可输出的字符用反斜杠加字符编号(就象在 c 语言里一样)的形式
相关文档:
参见:http://isis.poly.edu/kulesh/stuff/src/klist/
Introduction:
Linux kernel is mostly written in the C language. Unlike many other languages C does not have
a good collection of data structures built into it or supported by a collection of standard libraries.
Therefore, you're probably excited ......
在Linux操作系统下修改IP、DNS和路由配置
ifconfig eth0 新ip
然后编辑/etc/sysconfig/network-scripts/ifcfg-eth0,修改ip
一、修改IP地址
[aeolus@db1 network-scripts]$ vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=219.136.241.211
NETMASK=255.255.255.128
......
4)链接阶段
(Link)
在成功编译之后,就进入了链接阶段。
无选项链接
用法:[root]# gcc hello.o –o hello.exe
作用:将编译输出文件hello.o链接成最终可执行文件hello.exe。
[root]# ls
hello.c hello.exe hello.i hello.o hello.s
运行该可执行文件,出现正确的结果如下。
[roo ......
在Linux系统中,每台设备都是当成一个文件夹来对待。
设备 &nbs ......