linux实验-基本指令1
刚开始就用root账号登进去
1 进入tmp目录 cd /tmp
2 创建目录 mkdir myshare
创建用户 useradd testuser
设置密码 passwd testuser
3 修改文件权限 chown -R testuser:users myshare
4 切换账号 su testuser
进入myshare目录 cd /tmp/myshare
vi hello.sh
5 保存文件后,赋予权限 chmod 751 hello.sh
6 ./hello.sh
7 cd ~
ln -s /tmp/myshare/hello.sh myhello.sh
cp -p /tmp/myshare/hello.sh hello.sh.bak
8 回到root账号 su root
find / -name "*.conf" >output.txt
9 find / -name "*.conf" |xargs du -h |sort -n | tail -1 >> output.txt
find / -name "*.conf" |xargs du -h |sort -n | tail -1 >> output.txt
再vi output.txt把文件里面后面两行的文件名删掉。
10 who -a | wc -l >>output.txt
11 unix2dos -n output.txt.dos output.txt
12 tar -zcvf double.tar.gz testuser
linux实验-基本指令1的更多相关文章
- Linux入门50指令
1, mkdir创建目录 make directory 可以带着路径,在什么位置创建什么目录 如:mkdir /etc/date 在目录etc下创建date目录 重要参数 –p 递归创建,mkdir ...
- linux常用操作指令
Linux常用操作指令: 常用指令 ls 显示文件或目录 -l 列出文件详细信息l(list) -a 列出当前目录下所有文件及目录,包括隐藏的a(a ...
- Linux日常使用指令大全
Linux日常使用指令大全 Java代码 www.ahlinux.com 001.日常维护常用查询命令 #top 显示系统进程 #clear 清理屏幕信息 #cat /etc/redhat-r ...
- linux常用系统指令
[linux常用系统指令] 查看内核版本:cat /proc/version 查看发行版本:cat /etc/issue 通过安装lsb的方式查看发行版本: yum provides */lsb_re ...
- 【Linux】常用指令、ps查看进程、kill杀进程、启动停止tomcat命令、查看日志、查看端口、find查找文件
1.说出 10 个 linux 常用的指令 1) ls 查看目录中的文件 2)cd /home 进入 '/ home' 目录:cd .. 返回上一级目录:cd ../.. 返回上两级目录 3)mkdi ...
- (转)Linux系统stat指令用法
<Linux系统stat指令用法> 原文:https://www.cnblogs.com/linux-super-meng/p/3812695.html stat指令:文件/文件系统的详 ...
- (转)Linux最常用指令及快捷键 Linux学习笔记
Linux最常用指令及快捷键 Linux学习笔记 原文:http://blog.csdn.net/yanghongche/article/details/50827478 [摘自 鸟叔的私房菜]--转 ...
- linux的一些指令
linux的一些指令 █查看指令參數man 指令,如:man ls ,按q鍵退出 █查看文件列表ls -lht 按時間排序ll 列表ls 列表 目錄cd 目錄名稱 進入路徑cd .. 返回上層路徑 █ ...
- Linux - 网络相关指令
系统时间与开关机 查看系统时间 date 查看硬件日期 hwclock 学习Linux不必全部指令都会,只要记住主要常用的几个就可以了.--MK 关机命令 shutdown init reboot p ...
随机推荐
- check_mk的性能案例
http://wiki.lustre.org/Check_MK/Graphite/Graphios_Setup_Guide Dell PowerEdge R515 2x 8-Core AMD Opte ...
- apache--配置文件属性介绍
Apache apache是众多web服务器中的一员,其它web服务器还有什么nginx.Sun.Microsoft等等. 接下来我们主要讲解一下Apache 网站分为两类:1.静态网站2.动态网站 ...
- The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".
开发中,总有一下奇奇怪怪的问题 完整的错误就不贴了,异常提示: hibernate.xml] is invalid; nested exception is org.xml.sax.SAXParseE ...
- myeclipse 阿里巴巴java开发规范
今天发现阿里巴巴搞了个java开发规范,然后火了: 然后发现我也整了一下: 阿里巴巴java开发规范宣传页: http://mp.weixin.qq.com/s/IbibsXlWHlM59kfXJqR ...
- 随tomcat启动的Servlet程序
由于需要做一定定时轮询程序,自己写了一个Servlet小程序,在Servlet里面的Init函数中做一个Timer,定时执行程序. 代码如下: public class MailStartup ex ...
- 小组Scrum第一次冲刺
团队任务描述: 在确定完分组,并对于敏捷开发做了相应的了解之后,我们团队开始了第一次的冲刺.对于我们团队的第一次的 Scrum冲刺,我们团队开展了团队会议.首先,我们明确了我们的目标,对其进行了相对初 ...
- IOS 公司标示使用反向域名
1. 公司标示使用反向域名========================================正向域名 www.baidu.com 用来标示一台网络主机反向域名 cn.itcast.Myd ...
- c++下各种编码格式转换的方法
1.利用c++11新特性 std::wstring_convert配合std::codecvt模板类 作者:Gomo Psivarh链接:https://www.zhihu.com/question/ ...
- Type Syntax error, insert ")" to complete Expression
今天倒持了 几个小时! 愣是 没有明确 ,为什么我的JSP的第一行没有代码? 还是报错! 错误是: Description Resource Path Location Type Sy ...
- 2.Swift教程翻译系列——Swift概览
英文版PDF下载地址http://download.csdn.net/detail/tsingheng/7480427 依照传统学习程序语言都是从hello,world開始,在Swfit里面仅仅须要一 ...