随笔分类 - Linux备份
摘要:移除文件#rm -i file有信息确认的文件删除#rm file1 file2有信息确认的文件删除#rm -rf file强制删除file文件
阅读全文
摘要:/etc 存放系统管理所需要的配置文件和子目录/home 一般用户的主目录/usr 用户使用的系统目录和应用程序等信息/bin 存放使用者经常使用的命令 如cp ls cat 等/proc 系统内存映射 访问这个目录可获得系统信息管理磁盘#df -h列出当前目录下所有的目录和每个目录占有的磁盘空间#...
阅读全文
摘要:1 文件或目录打包打包有如下多种情况A>包含子目录打包find /usr/lib -print /cpio -o >/uo/temp1.cpio将/usr/lib目录下的文件与子目录打包成一个文件库为/uo/temp1/cpio若通过-o选项结束打包整个目录下的所有文件与子目录常先利用find 目录...
阅读全文
摘要:#zip -v gong zipzip info: xxx>删除压缩文件中俄smart.txt 文件#zip -d gong.zip smart.txtdeleting:smart.txt>向压缩文件中gong.zip中添加rpm_info.txt文件#zip -m gong.zip ./rpm_i...
阅读全文
摘要:>显示gong.tar 文件内容#tar tf gong.tar./epuinfo.txt./smart/./smart/smartsuite-2.1-2.i386.rpm./smart.txt./tar_creat.txt>从tar文件中取出文件对当前目录下的gong.tar解包#tar xvf ...
阅读全文
摘要:1> 重新设置启动防火墙命令#service iptables restart2>添加防火墙规则命令2.1 #service iptables stop 停止防火墙2.2 #vi /etc/sysconfig/iptables 编辑配置文件2.3 -A INPVT -P tcp -m tcp --s...
阅读全文
摘要:#cd /usr/local#mkdir APACHE#tar zxvf /usr/etc/DEV/httpd-2.2.9.tar.gz#mv httpd-2.2.9/* .#rm -rf httpd-2.2.9/#./configure<---prefix参数 含义:把文件放在/opt/APACH...
阅读全文
摘要:1 安装方式下载2禁制源码安装包mysql-5.5.27-linux2.6-i686.tar.gz备注:2禁制额包解压缩后直接就可以使用 不用Make2 步骤shell>groupadd mysqlshell>useradd -d /home/mysql -m mysql -g mysqlshell...
阅读全文
摘要:软件包管理用rpm命令来管理rpm 软件包1>遵循GPL 规则2>安装 foo-2.0-1.i386.rpm软件包#rpm -ivh foo-1.0-1.i386.rpm3>已经安装 foo-1.0-1.i386.rpm仍然像安装#rpm-ivh --replacefiles foo-1.0-l.i...
阅读全文
摘要:1 #yum remove httpd2 #yum -y install httpd php-commonphp-devel php-gd php-mcrypt php-mbstringphp-pear php-bcmath php-dba php-mhash php-mxl3 #whereis h...
阅读全文
摘要:-y 如果yum在工作过程中需要使用者响应.这个参数可以直接回答yes#yum list 列出资源库中所有可安装或者可更新的rpm包#yum perl 列出为perl的包#yum perl* 列出为perl开头的包#yum install perl 安装perl包#yum remove perl...
阅读全文
摘要:查看端口#lsof -i :端口号|\根据端口号查看进程信息例如:#lsof -i:8080command pid user fd type device size nodejava 15419 root 29u ipv6 8277 tcpname*:webcache 根据进程号查看进程对应可执行程...
阅读全文
摘要:server with sites set up for download files sometimes provide ananonymous ftp account数据传输ftp 192.168.0.128name: usernamepassword:user's passwordcomman...
阅读全文
摘要:ftpserver with sites et up for downloaing filessometimes provides an anonymous ftp account数据传输ftp 192.168.0.128name:(username)password:(user's passwor...
阅读全文
摘要:#wc 文件名.txt输出 4 13 65 文件名.txt -->4 行13个单词#wc -w 文件名.txt 统计单词数量#wc -l 文件名.txt 统计行数#wc -c 文件名.txt 显示文件byte数grep wang /etc/passwd |wc -d
阅读全文
摘要:为代表的任意字符串 ls *.txt如下 reame.txt recipes.txt? 仅与一个任意字符匹配[...] 同方括号中任意个字符相匹配[1-9] 匹配1到9之间的任意一个字符[a-zbe5-7]同所有a-z之间的字符和b,e,5,6,7相匹配[!...]与所有不再方括号中的某个字符匹配 ...
阅读全文
摘要:r w x读 写 执行4 2 1如果要启动tomcat服务器 即执行startup.sh 脚本文件1) #chmod 444 startup.sh <----增加文本读权限即 -r--r--r-- 1 root root ....2) #cd /usr/etc/DEV/tomcat/bin3)#ch...
阅读全文
摘要:#tail -f -n 100 catalina.out含义:从文件尾部监视catalina.out文件 主要看尾部100行#tail -f -n 100 catalina.out > nohup.out& ------------也可以指定输出文件的路径 &进入后台 ...
阅读全文
摘要:空格 或者 ctrl+f 前进一屏 ctrl+b 后退一屏幕回车 前进一行/string 查找含有string字符串的页?string 同上n 同向查找N 反向查找=当前行号ctrl+u 文件中向上移动半屏 ctrl d 下移动半屏ctrl +y 上移动一行ctrl+...
阅读全文