Linux系统复习笔记.doc_第1页
Linux系统复习笔记.doc_第2页
Linux系统复习笔记.doc_第3页
Linux系统复习笔记.doc_第4页
Linux系统复习笔记.doc_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1. /boot,swapsata sda, sdb, sda1,sda5idehda,hdbSATA115-15.IDE595-63 /dev/sdb12. Linux77tty76tty1tty6ctrl+alt+F1F73. man1 shell2 4 /dev5 8 /+ 4. rootshutdown poweroff haltrebootshutdown/poweroff/halt sync root sync;sync;sync;rebootinit level 0 level 3 level 5 level 6 init 0 init 65. /etc/passwd root/etc/shadow /etc/group ls -l drw-rr- 1 root root 42304 Sep 4 18:26 install.log12(3) 4owner(5) group(6) 781- d: directoryl: link p: b: block c: 29u(users), g(group), o(others)r(w(x( r w x r: lsw: xx: 3i6. chmod1chmod 744 rwxrr-2chmod u + r g - wo = xachmod u+rw, go=wx a+w chown chown root chgrp chgrp root7. Linuxlinuxlinux8. $PATH /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/heyu/heyu/bin$PATHPATH=$PATH:/user. .PATH9. UMASKumask-rw-rr-644666drwxr-xr-x755777umask022.umaskumaskumaskumask 002 umask003(-rw-rw-rw-) - (-wx) = (-rw-rw-r) 664drwxrwxrwx - (d-wx) = (drwxrwxr-) 77410. SUIDSGIDSUIDset UIDUIDownerUIDSGIDset GIDGIDwSUIDSGIDchmod 4755 filename chmod u+rwxs,g+rw,o+rw UIDchmod 2755 filename chmod u+rwx,g+rws,o+rw GIDaccessint access(const * char pathname,int mode)mode0-1mode R_OK,W_OK,X_OK,F_OK()11. r,w,xowner,group,mtime,ctimeatime)inodedata blocksuper block)inodeblocksuperblock: filesysteminodeinode,blockblockblockblockblockinodeblockblockblockblockinode12. inodeblockinodeinodeblockblockinodeln ln-s13. linux1fdisk2,mkfs -t ext3 /dev/sdb6314. swapswapswap12 mkswap 3swapon; swapoffnone15. 1/,/boot,/home2mount mount /dev/sdb6 /mnt/hdb6(3) umount etc/fstab/dev/hdc6 /mnt/hdc6 ext3 defaults 1 2(1)234/defaults50 1 6fsck0 /etc/fstab16. gzip,bzip2bzip2gziptar1gzip*.gzgzip -d 2bzip2 *.bz2 3tar - j bzip2*.tar.bz2- z gzip*.tar.gz- c - t - v - f - x - C tar -zcv -f tar -jcv -ftar -cf : *.tar tar -zxv -f -C (tar -jxv -f)tar -xf -C: tar -ztv -f tar -tf 17. ViVimVi: Unix likeViVim: Vi1Viq(w) Enter i,a,o EscVi: :wq :q! ZZ2j: +k: h: l$0Enter Ctrl+f : Ctrl+b : Ctrl+u : Ctrl+d : H M L G nG +Ggg: /word word?word wordn N s : S n1,n2s/old/new/g : n1n2oldnewx,X xXnx ndd dw dnw nndd nd1G 1dG d$ d0 D x,yd xyyy nyy ny1G yG y0 y$ p,P pPJ u U Ctrl+r . i,I iIa,A aAo,O oOr,R rREsc:w :W! :q Vi:q! :wq :w filename r filename : :set nu :set nonu 18. ShellBashShell: KDEGnomekernelShellBash,ShellKDE/bin/bash: linuxshell/bin/ksh : kbashbash/bin/tcsh: C shell, BashPIDBashBash19. /etc/profile: /etc/shadow: rootecho $ echo =unset env: export: export 18. /etc/passwd heyu: x:500:500:heyu:/home/heyu:/bin/bashxIDIDShelluseradd: userdel: passwd: rootpasswd +sudo/etc/sudoerssudovisudo: /etc/sudoersroot ALL=(ALL) ALL username ALL=(ALL) ALL 19. ACLACLaccess control listowner,group,others1 acl_set_fileacl_set_fdint acl_set_fd(int fd,acl_t acl);int acl_set_file(const char *path_p,acl_type_t type,acl_acl);path: fd: type: acl: acl0-12 acl_get_fileacl_get_fdacl_t acl_get_fd(int fd);acl_t acl_get_file(const char *path_p,acl_type_t type);3 acl_create_entryint acl_create_entry(acl_t *acl_p,acl_entry_t *entry_p)20. gcclinux C gccgcc*.ca.outgcc -c .cgcc -o .c.oGcc -o gcc -O0-o: gcc -O1-o: gcc -O2-o: gcc -O3-o: gcc -g-o : gcc -L: -Lgcc -S: gcc -E: .c()1 gcc -c p1.c p2.c2 gcc -o p p1.o p2.o3 ./p21. MakemakemakemakemakefileMakefilemakeMakefile(1) MakefileSB1sb.o 2sb.o 100sb.ogcc -o SB 1sb.o 2sb.o 100sb.o(Tab)1sb.o:1sb.cgcc -c 1sb.cTabhello:hello.o hello2.ogcc -o hello hello.o hello2.ohello.o:hello.cgcc -c hello.chello2.o:hello2.cgcc -c hello2.c(2) make cleanmakefileclean:rm -f hello hello.o hello2.omake clean(3) CFLAGS,LDFLAGS,CPPFLAGSmakefileshellmakefile1 CFLAGS= -g gcc -c $(CFLAGS) hello.c2 LDFLAGS= -L/usr/lib/gsl -lgslgcc -o hello $(LDFLAGS) hello.o hello2.o3 CXXFLAGS C+ 4 CPPFLAGS -I -D -U5 CC gcc make6 CXX g+ C+(4) makeall: all:hellohello:hello.o hello2.ogcc -o hello hello.o hello2.omakehelloclean: install: make install /usr/local/bindisclean: .omakefile(5) gcc .o.cCFLAGS += -g make -pmake -j $ : $+ : $ : $? : $ (0x00007fff8eca7000)libhello2.so = /tmp/libhello2.so (0x00007ff12d18f000)()libc.so.6 = /lib64/libc.so.6 (0x0000003033c00000)/lib64/ld-linux-x86-64.so.2 (0x0000003033400000)23. gdbgdb -g gdbl: listb n: n (break 6)r: runnext: kill: quit: gdbinfo break: print i: ip i Enter : display i: ic: d b bt: fr: Up: down: b 7 if i=8: disable step set args: export path: gdbpathgdbwatch examine / 4dwdw3224. stdin: 0 ; ( )stderr 222;()ls -l / ./profile profilels -l / ./profile profile2 2cat newfile newfile eof eof25. * ? a,c,da-d bc,bcc26. STDIN_FILENO 0STDOUT_FILENO 1STDERR_FILENO 227. 1creat (2) open (3) read (4) write (5) close (6) unlink inode(7) lseek (8) access (9) stat fstat lstat(10) statfs (11) mknod (12) st_mode (13) utime (14) chdir fchdir(15) getcwd (16) opendir,readdir,closedir,rewinddir: 28 IOstdin,stdout()stderr setbuf: setbuffer: setlinebuf: setvbuf: fileno dup2IOfopen: fclose: fgetc,getc,getchar: fp

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论