学习Linux第四天
2015-09-17 16:32
549 查看
---恢复内容开始---
1.常用的命令:
reset 清屏
leave +hhmm 建立离开提醒
sudo apt-get yum 安装yum程序
sudo su 切换root身份
see test.c 可以直接查看文件,神奇
fmt file.txt 格式化文件
zip distination.zip source 压缩文件
zip -r distination.zip source_fold 压缩文件夹
mkdir 创建文件夹
touch 创建文件
gzip source_file 压缩为.gz格式,会删除源文件
gzip -c source_file 不会删除源文件
gunzip 解压
cd 回家
bzip2 -k source_file 压缩为.bz2格式并保留源文件
tar -zvf distination_filename.tar source_filename 压缩为tar格式,-z压缩,-v显示过程,-f指定打包文件名
tar -xvf source_filename.tar 解压
当命令为-zxvf 解压tar.gz格式的文件
-jxvf -C source_fold 解压tar.bz2格式的文件,到其他目录
runlevel 查看系统当前运行级别
logout 退出登录
w 查看系统信息
---恢复内容结束---
5.Some tips from youtube
pwd print write direct path
cat textfile.txt 直接查看文本文档
cat text1.txt text2.txt > sdstaff.txt 合并文档
alias new_command_name 'source_command_name' 给命令起别名
ctrl+a ahead 光标回到行首
ctrl+e end 光标回到行尾
ctrl+c cancel 强制取消当前执行的命令
ctrl+l reset清屏
--编写shell指令--
1.直接输出:
echo "this is a Linux command!"
echo -e "\e[1;32mThis is a \e[1;36mLinux\e[0m command\e[0m"; 可以解析转意字符(这个命令有颜色)
2.编写shell脚本:
vim hello_world.sh 使用vim建立shell脚本
还可以使用: vm hello_world.sh touch hello_world.sh
3.执行:
bash hello_world.sh 强制执行
chmod 755 hello_world.sh ./hello_world.sh 先修改权限,再执行
4.缓存:
echo -PATH 输出系统的环境变量
1.常用的命令:
reset 清屏
leave +hhmm 建立离开提醒
sudo apt-get yum 安装yum程序
sudo su 切换root身份
see test.c 可以直接查看文件,神奇
fmt file.txt 格式化文件
zip distination.zip source 压缩文件
zip -r distination.zip source_fold 压缩文件夹
mkdir 创建文件夹
touch 创建文件
gzip source_file 压缩为.gz格式,会删除源文件
gzip -c source_file 不会删除源文件
gunzip 解压
cd 回家
bzip2 -k source_file 压缩为.bz2格式并保留源文件
tar -zvf distination_filename.tar source_filename 压缩为tar格式,-z压缩,-v显示过程,-f指定打包文件名
tar -xvf source_filename.tar 解压
当命令为-zxvf 解压tar.gz格式的文件
-jxvf -C source_fold 解压tar.bz2格式的文件,到其他目录
runlevel 查看系统当前运行级别
logout 退出登录
w 查看系统信息
---恢复内容结束---
5.Some tips from youtube
pwd print write direct path
cat textfile.txt 直接查看文本文档
cat text1.txt text2.txt > sdstaff.txt 合并文档
-----补录(根据记忆)------
alias 查看命令的别名alias new_command_name 'source_command_name' 给命令起别名
ctrl+a ahead 光标回到行首
ctrl+e end 光标回到行尾
ctrl+c cancel 强制取消当前执行的命令
ctrl+l reset清屏
--编写shell指令--
1.直接输出:
echo "this is a Linux command!"
echo -e "\e[1;32mThis is a \e[1;36mLinux\e[0m command\e[0m"; 可以解析转意字符(这个命令有颜色)
2.编写shell脚本:
vim hello_world.sh 使用vim建立shell脚本
还可以使用: vm hello_world.sh touch hello_world.sh
#!bash/powershell #this is an annotation echo 'this is a linux shell command!';
3.执行:
bash hello_world.sh 强制执行
chmod 755 hello_world.sh ./hello_world.sh 先修改权限,再执行
4.缓存:
echo -PATH 输出系统的环境变量
相关文章推荐
- Linux同步机制(二) - 条件变量,信号量,文件锁,栅栏
- Linux同步机制(二) - 条件变量,信号量,文件锁,栅栏
- 更改linux swappiness 提高物理内存使用率
- Centos iptables防火墙设置
- Linux命令行基本操作
- Centos7.1防火墙开放端口
- Linux进程通信(无名管道,有名管道,共享内存)的实现
- Linux系统下部署maven nexus私服和手动同步中央仓库索引
- linux添加静态路由表,重新启动继续有效
- Linux signal() 信号处理函数
- [CentOS] 常用工具软件包
- Linux用到的指令
- Linux用到的指令<小记>
- linux 上下文切换带来的影响
- Linux 获取网口详细信息
- centos 安装FTP server详情
- Centos 建立一个新用户 详细讲解
- linux yum命令详解
- linux双向链表分析之list_del中的技巧
- linux下openssl-1.0.0c编写openssl服务器和客户端