linux操作
三名狂客
success without applause,diligence without reward!Becoming、Cognifying、Flowing、Screening、Accessing、Sharing、Filtering、Remixing、Interacting、Tracking、Questioning、Beginning.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
linux 内核管道通信
#include #include #include main() { int pid1,pid2; int fd[2]; char outdata[100],indata[100]; if(pipe(fd) printf("Create pipe error!!!\n"); return -1; } while((pid1=fork())==-1)原创 2014-11-29 14:42:11 · 716 阅读 · 0 评论 -
学会Git
转载 2018-01-27 10:28:03 · 314 阅读 · 0 评论 -
linux学习总结
目录 Linux命令分类 文件管理 File Management文件传输 File Transfer文档编辑 File Editor备份压缩 File Compression系统管理 System Management系统设置 System Settings网络通讯 Network Communication磁盘管理 Disk Management磁盘维护 Disk Maintena转载 2017-04-09 20:19:38 · 838 阅读 · 0 评论 -
linux 基本命令汇总
linux的命令操作 1、日常操作命令 **查看当前所在的工作目录 pwd **查看当前系统的时间 date **查看有谁在线(哪些人登陆到了服务器) who 查看当前在线 last 查看最近的登陆历史记录 2、文件系统操作 ** ls / 查看根目录下的子节点(文件夹和文件)信息 ls -al -a是原创 2017-03-13 20:58:51 · 435 阅读 · 0 评论 -
linux下的基本操作12(进程控制)
1.查看用户最近登录情况 last lastlog 2.查看硬盘使用情况 df 3.查看文件大小 du 4.查看内存使用情况 free 5.查看文件系统 /proc 6.查看日志 ls /var/log/ 7.查看系统报错日志 tail /var/log/messages 8.查看进程 top 9.结原创 2017-03-13 20:56:41 · 422 阅读 · 0 评论 -
linux下的基本操作11(输入输出重定向及管道)
1.新建一个文件 touch a.txt > b.txt 2.错误重定向:2> find /etc -name zhaoxing.txt 2> error.txt 3.将正确或错误的信息都输入到log.txt中 find /etc -name passwd > /tmp/log.txt 2>&1 find /etc -name passwd &> /tmp/log.原创 2017-03-13 20:55:03 · 561 阅读 · 0 评论 -
linux下的基本操作10(正则表达式)
1.cut截取以:分割保留第七段 grep hadoop /etc/passwd | cut -d: -f7 2.排序 du | sort -n 3.查询不包含hadoop的 grep -v hadoop /etc/passwd 4.正则表达包含hadoop grep 'hadoop' /etc/passwd 5.正则表达(点代表任意一个字符)原创 2017-03-13 20:53:29 · 552 阅读 · 0 评论 -
linux下的基本操作09(打包和压缩)
1.gzip压缩 gzip a.txt 2.解压 gunzip a.txt.gz gzip -d a.txt.gz 3.bzip2压缩 bzip2 a 4.解压 bunzip2 a.bz2 bzip2 -d a.bz2 5.将当前目录的文件打包 tar -cvf bak.tar . 将/etc/password追加文件到bak.tar中(r)原创 2017-03-13 20:52:14 · 663 阅读 · 0 评论 -
linux下的基本操作08(查找)
1.查找可执行的命令: which ls 2.查找可执行的命令和帮助的位置: whereis ls 3.查找文件(需要更新库:updatedb) locate hadoop.txt 4.从某个文件夹开始查找 find / -name "hadooop*" find / -name "hadooop*" -ls 5.查找并删除 find / -na原创 2017-03-13 20:51:02 · 439 阅读 · 0 评论 -
linux下的基本操作07(vim)
i a/A o/O r + ?替换 0:文件当前行的开头 $:文件当前行的末尾 G:文件的最后一行开头 1 + G到第一行 9 + G到第九行 = :9 dd:删除一行 3dd:删除3行 yy:复制一行 3yy:复制3行 p:粘贴 u:undo ctrl + r:redo "a剪切板a "b剪切板b "ap粘贴剪切板a的内容原创 2017-03-13 20:49:03 · 511 阅读 · 0 评论 -
linux下的基本操作06(文件夹属性)
1.查看文件夹属性 ls -ld test 2.文件夹的rwx --x:可以cd进去 r-x:可以cd进去并ls -wx:可以cd进去并touch,rm自己的文件,并且可以vi其他用户的文件 -wt:可以cd进去并touch,rm自己的文件 ls -ld /tmp drwxrwxrwt的权限值是1777(sticky)原创 2017-03-13 20:47:34 · 513 阅读 · 0 评论 -
linux下的基本操作05(权限)
创建a.txt和b.txt文件,将他们设为其拥有者和所在组可写入,但其他以外的人则不可写入: chmod ug+w,o-w a.txt b.txt 创建c.txt文件所有人都可以写和执行 chmod a=wx c.txt 或chmod 666 c.txt 将/itcast目录下的所有文件与子目录皆设为任何人可读取 chmod -R a+r /itcast 将/i原创 2017-03-13 20:46:13 · 506 阅读 · 0 评论 -
linux下的基本操作04(用户和组命令)
添加一个tom用户,设置它属于users组,并添加注释信息 分步完成:useradd tom usermod -g users tom usermod -c "hr tom" tom 一步完成:useradd -g users -c "hr tom" tom 设置tom用户的密码 passwd tom 修改tom用户的登陆名为tomcat原创 2017-03-13 20:44:19 · 525 阅读 · 0 评论 -
linux下的基本操作03(系统命令)
1.查看主机名 hostname 2.修改主机名(重启后无效) hostname hadoop 3.修改主机名(重启后永久生效) vi /ect/sysconfig/network 4.修改IP(重启后无效) ifconfig eth0 192.168.12.22 5.修改IP(重启后永久生效) vi /etc/sysconfig/network-原创 2017-03-13 20:42:33 · 412 阅读 · 0 评论 -
linux下的基本操作02(文件相关命令)
1.进入到用户根目录 cd ~ 或者 cd cd ~hadoop 回到原来路径 cd - 2.查看文件详情 stat a.txt 3.移动 mv a.txt /ect/ 改名 mv b.txt a.txt 移动并改名 mv a.txt ../b.txt 4拷贝并改名 cp a.txt /etc/b.txt 5.vi撤销修改 ctrl原创 2017-03-13 20:41:01 · 440 阅读 · 0 评论 -
linux下的基本操作01
1.内部命令:echo 查看内部命令帮助:help echo 或者 man echo 2.外部命令:ls 查看外部命令帮助:ls --help 或者 man ls 或者 info ls 3.man文档的类型(1~9) man 7 man man 5 passwd 4.快捷键: ctrl + c:停止进程 ctrl + l:清屏 ctrl原创 2017-03-13 20:38:37 · 543 阅读 · 0 评论 -
linux 进程通信
message_send.c #include #include #include #include #include #include #define MAX_TEXT 512 struct msg_st { long int msg_type; char text[MAX_TEXT]; }; int main() { int ru原创 2014-11-29 14:48:48 · 681 阅读 · 0 评论 -
Linux常用命令
一、Linux的简介1.Linux的概述Linux是基于Unix的开源免费的操作系统,由于系统的稳定性和安全性几乎成为程序代码运行的最佳系统环境。Linux是由Linus Torvalds起初开发的,由于源代码的开放性,现在已经衍生出了千上百种不同的Linux系统。Linux系统的应用非常广泛,不仅可以长时间的运行我们编写的程序代码,还可以安装在各种计算机硬件设备中,比如手机、平板电脑、路由器等。...翻译 2018-04-01 15:56:38 · 416 阅读 · 0 评论
分享