slide-03 File System

File System

具体分为 file; directory
File : data container
Directory : files container
重要的路径
/opt/ install new application
/usr/bin/ basic linux system command, file manipulation, all accessible
/usr/sbin/ system administration commands. Use for root. /usr/lib/ archive and shared libraries, C, C++ libraries
/sbin/ startup , shutdown
/home/ home directory, own directory, login directory
/etc/ system configuration files
/mnt/ mount other devices

Path Names

注意:
linux :/
如 /home/cll2020/T-CVAE-rl-pos/data
dos : \

Special Directories

Login Directory :/home/cll2020/
Dot (.) 当前路径
$ cp /home/cll2002/1.txt .
复制文件到当前路径
Dot Dot (…) 上一层路径
$ cp …/cll2002/1.txt .
root directory(/)
$ cd /

Basic File System Commands

$ pwd Presenting Working Directory
$ ls : list directory content
众多option
ls [-adlFR] [pathname]
-a 显示路径下的常规文件和隐藏文件,隐藏文件的开头是 ‘.’
-R 递归查文件,类似tree
$ cd Change Directory

find

该命令很占cpu,慎用
find [path] [-option] [expression]
模糊查找
(’’, ‘?’, and `[]’)
’ * ’ 表示一个或者多个占位符
‘ ?’ 只表示一个占位符
‘ [] ’ 只表示一个占位符,[] 放着这个字符的范围
$ find ./ -name y
1
$ find ./ -name y?211
$ find ./ -name y??211
$ find ./ -name y[a-z]211
$ find ./ -name y[abcd][0-9]11

除了根据名字,也有其他查找文件的方法
$ find ./ -size +20k
找文件大小大于20k
$ find ./ -size -20k
找文件大小小于20k

mkdir rmdir

$mkdir 不允许跳级创建目录
mkdir -p 允许跳级创建目录,如果父目录不存在就创建一个
$ mkdir -p proj/work

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值