Linux下的系统编程与网络编程(一 Linux基础)

关于VMware错误

1、提示内存不足

     a.将需要内存调小(2G以下)

     b.开机重启

2、内部错误

     控制面板->管理工具->服务->VMware启动


(一)文件系统

文件系统:Linux文件层次结构  文件类型  根目录下各子目录的作用  Ext2文件系统

/home   所有普通用户的家目录

/bin       命令对应的可执行文件

/etc       系统的配置文件(设置)

/proc     虚拟目录、内存的映射(进程单位)

/root      root用户的家目录

/dev      所有的设备文件

/lib        系统使用的库文件(静态库、共享库)

/usr      系统安装的软件

文件层次结构是树状图


文件类型:普通文件、目录文件(文件夹)、链接文件(软连接、硬链接)、管道文件(进程间通讯)、设备文件

(第一位)                      (第二位)            (第三位)

-  普通文件                       r  读权限                  数字表示含义:

d 目录文件                       w 写权限                 普通文件:链接数

p 管道文件                       x  可执行                 目录文件:子目录数(第一集子目录)

l  链接文件                       -  无权限

b 块设备文件

c 字符设备文件

s 套接字文件




基本命令:(命令与参数之间用空格隔开)

ls         显示当前目录下的文件

ls   -a   显示此目录下全部文件

ls   -l    显示文件属性

pwd    显示当前目录的绝对路径(从根目录开始)        ps(相对路径:从当前目录开始)

cd       切换目录

cd    .. 返回上一目录 

cd    ../..返回上两级目录

cd    /home/stu/Desktop   进入Desktop文件


Ext2          linux默认的文件系统

NTFS          windows默认的文件系统

Ext2文件系统

super block   inode和block总量、使用量以及文件系统信息

inode            文件权限及属性              ls   -i  显示文件的inode号码

block            文件的实际数据


文件基本操作

                  普通文件(文本文件)                                      目录文件(文件夹)

创建       touch   filename.name                                      mkdir       filename.name
删除       rm        filename.name                                      rm   -r      filename.name  (非空目录) 
                                                                                        rmdir       filename.name  (空目录)
拷贝       cp       path1/filename.name    path2                cp  -r        path1      path2
剪切       mv      path1/filename.name    path2                mv            path1     path2
重命名   mv       path1/file.name     path1/new.name      path1/file.name   path1/new.name
编辑文件内容      vi/vim     filename.name
查看文件内容       cat     more     less     head     tail
查看文件属性       ll
修改文件权限       chmod
进入root权限        su
退出root权限        exit
文件压缩              tar   zcf    name.tgz   filelist
文件解压              tar   zxf    name.tgz

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
broadcast icmp jiqiao multi_broad raw sys_net_ml tcp1 term thread udp cap io mul_thread_download qq sem tcp tcp_dos testerr time wav ./broadcast: broad.h client.c server server.c ./cap: capture_packet capture_packet.c ./icmp: icmp.c ./io: aa ba conf filename.c fwrite.c print.c scandir.c setvbuf test tree1.c vprintf ab bb conf.c fwrite print scandir server.conf setvbuf.c tree tree.c vprintf.c ./io/test: a abb b c d ./io/test/d: e f g ./jiqiao: client client.c udp_server udp_server.c ./mul_thread_download: down.c download download-注释.c readme.txt ./multi_broad: client.c mul.h server.c ./qq: ansi_code.c client gen_single_nohead_pre.c Makefile server tcp.h ansi_code.h client.c gen_single_nohead_pre.h play_sub.c server.c ansi_code.o client.o gen_single_nohead_pre.o play_sub.h server.o ./raw: gethostbyname.c ping1.c ping.c zs.c ./sem: semget_1.c semget.c ./tcp: fork qq simple ./tcp/fork: client client.c server server.c tcp.h ./tcp/qq: client client.c gen_single_nohead_pre.h server.c client1.cv gen_single_nohead_pre.c server tcp.h ./tcp/simple: client client.c makefile server server.c tcp.h ./tcp1: fork ftp simple simple1 ./tcp1/fork: client.c server.c tcp.h ./tcp1/ftp: client.c ftp.h server.c ./tcp1/simple: client client.c makefile server server.c tcp.h ./tcp1/simple1: client1.c client2.c client.c server1.c server2.c server.c ./tcp_dos: tcp_dos tcp_dos.c ./term: getpass getpass.c gets gets.c translate ./term/translate: ansi_code.c ansi_code.o chin.c dict dict.o glist.c glist.o input.h Makefile ansi_code.h chin ciku.dict dict.c glist1.c glist.h input.c input.o tags ./testerr: testerr_copyclient.c testerr_copyserver.c testerrno_copyserver1.c ./thread: aa bping.c hello pthread_attr.c pthread_create pthread_mutex.c while.c aa.c chain hello.c pthread_attr.s pthread_create1.c pthread_rwlock aa.h cond pthread_attr pthread_cond pthread_create.c pthread_rwlock.c bping cond.c pthread_attr1.c pthread_cond.c pthread_mutex while ./thread/chain: chain_queue.c chain_queue_hanoi chain_queue.o hanoi.c main.c chain_queue.h chain_queue_hanoi.c hanoi main ./time: asctime ctime gettimeofday strftime time time.c asctime.c ctime.c gettimeofday.c strftime.c timea.c ./udp: client client_echo client_loop reliable_udp server_echo.c server_loop.c udp_server client1 client_echo.c client_loop.c server server_hello stack client1.c client_hello htonl server.c server_hello.c stack.c client.c client_hello.c htonl.c server_echo server_loop ts ./udp/reliable_udp: reliable_recv reliable_recv_std reliable_send reliable_send_std reliable_recv.c reliable_recv_std.c reliable_send.c reliable_send_std.c ./wav: exec line.c lrc_display makefile play.c playwav.c setitimer1.c getline llist.c lrc_display.c mp3 play_sub.c playwav.h setitimer.c getline.c llist.h main.c play play_sub.h setitimer ./wav/mp3:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值