当前位置: 首页 > news >正文

网站建设的认识搜狗seo

网站建设的认识,搜狗seo,做视频网站容易收录吗,免费建站优化Linux之文件和目录类命令详解(2) 1、mv-移动文件或重命名2、find-查找文件和目录3、locate-快速查找文件4、du-显示目录或文件的磁盘使用情况5、df-显示文件系统的磁盘空间使用情况6、chmod-更改文件或目录的权限7、chown-更改文件或目录的拥有者8、tree…

Linux之文件和目录类命令详解(2)

  • 1、mv-移动文件或重命名
  • 2、find-查找文件和目录
  • 3、locate-快速查找文件
  • 4、du-显示目录或文件的磁盘使用情况
  • 5、df-显示文件系统的磁盘空间使用情况
  • 6、chmod-更改文件或目录的权限
  • 7、chown-更改文件或目录的拥有者
  • 8、tree-以树状结构列出目录内容

1、mv-移动文件或重命名

1.1 基本用法:

##移动文件或目录,或者重命名文件。
mv source_file destination_file

1.2 常用选项:

-i:在目标文件已存在时提示确认
mv -i old_name new_name

1.3 实例

[root@test test]# ll
total 4
-rw-r--r-- 1 root root 8 Nov 10 18:41 a.txt
[root@test test]# mv a.txt b.txt
[root@test test]# ll
total 4
-rw-r--r-- 1 root root 8 Nov 10 18:41 b.txt##当前系统redhat7.9,执行mv默认带-i
[root@test test]# ll
total 8
-rw-r--r-- 1 root root 8 Nov 10 18:53 b.txt
-rw-r--r-- 1 root root 8 Nov 10 18:41 c.txt
[root@test test]# mv b.txt c.txt
mv: overwrite ‘c.txt’? n
[root@test test]# ll
total 8
-rw-r--r-- 1 root root 8 Nov 10 18:53 b.txt
-rw-r--r-- 1 root root 8 Nov 10 18:41 c.txt##若仅执行mv,则不会提示确认,直接更改
[root@test test]# \mv b.txt c.txt
[root@test test]# ll
total 4
-rw-r--r-- 1 root root 8 Nov 10 18:53 c.txt

2、find-查找文件和目录

2.1 基本用法

find /path/to/search -name filename

2.2 常用选项

-type f:仅查找文件-type d:仅查找目录-name pattern:根据文件名模式查找

2.3 实例

[root@test test]# find /root/test -type f -name "*.txt"
/root/test/c.txt
[root@test test]# find /root/ -type d -name "test"
/root/test

3、locate-快速查找文件

3.1 基本用法

locate filename

3.2 常用选项

-r:使用正则表达式实现精确匹配

3.3 实例

[root@test test]# locate c.txt
/root/test/c.txt
/usr/share/doc/alsa-lib-1.1.8/asoundrc.txt
/usr/share/doc/libreswan-3.25/opportunistic-v1.historic/opportunism-spec.txt
/usr/share/doc/python-kitchen-1.1.1/html/_sources/api-text-misc.txt
/usr/share/doc/qemu-kvm/qmp-spec.txt
/usr/share/doc/skkdic-20130104/edict_doc.txt
/usr/share/doc/vim-common-7.4.629/README_amisrc.txt
/usr/share/doc/vim-common-7.4.629/README_mac.txt
/usr/share/doc/vim-common-7.4.629/README_src.txt
/usr/share/vim/vim74/doc/arabic.txt.gz
/usr/share/vim/vim74/doc/os_mac.txt.gz
/usr/share/vim/vim74/doc/os_risc.txt.gz
/usr/share/vim/vim74/doc/pi_spec.txt.gz
/usr/share/vim/vim74/doc/usr_toc.txt.gz##使用正则表达式实现精确匹配
[root@test test]# locate -r '/c\.txt$'
/root/test/c.txt
[root@test test]#

4、du-显示目录或文件的磁盘使用情况

4.1 基本用法

du directory_name

4.2 常用选项

-h:以人类可读的格式显示(KB, MB, GB)
-s:显示总计而非每个文件的大小

4.3 实例

[root@test test]# ll
total 12
-rw-r--r-- 1 root root 8 Nov 10 19:10 a.txt
-rw-r--r-- 1 root root 8 Nov 10 19:10 b.txt
-rw-r--r-- 1 root root 8 Nov 10 18:53 c.txt
[root@test test]# du -h
12K     .
[root@test test]# du -h *
4.0K    a.txt
4.0K    b.txt
4.0K    c.txt
[root@test test]# du -s
12      .
[root@test test]# du -s *
4       a.txt
4       b.txt
4       c.txt
[root@test test]# du -sh
12K     .
[root@test test]# du -sh *
4.0K    a.txt
4.0K    b.txt
4.0K    c.txt

5、df-显示文件系统的磁盘空间使用情况

5.1 基本用法

df

5.2 常用选项

-h:以人类可读的格式显示

5.3 实例

[root@test test]# df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs               3.9G     0  3.9G   0% /dev
tmpfs                  3.9G     0  3.9G   0% /dev/shm
tmpfs                  3.9G   13M  3.9G   1% /run
tmpfs                  3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/rhel-root   26G  3.9G   23G  15% /
/dev/sda1             1014M  170M  845M  17% /boot
tmpfs                  797M   12K  797M   1% /run/user/42
tmpfs                  797M     0  797M   0% /run/user/0

6、chmod-更改文件或目录的权限

6.1 基本用法

chmod 755 filename

6.2 常用选项

+x:添加执行权限
-x:移除执行权限
r:读取权限
w:写入权限
x:执行权限

6.3 实例

[root@test test]# ll
total 4
-rw-r--r-- 1 root root 8 Nov 10 19:10 a.txt
[root@test test]# chmod u+x a.txt
[root@test test]# ll
total 4
-rwxr--r-- 1 root root 8 Nov 10 19:10 a.txt

7、chown-更改文件或目录的拥有者

7.1 基本用法

chown user:group filename

7.2 常用选项

-R:递归地更改目录及目录内所有文件的所有者和组

7.3 实例

[root@test test]# ll
total 4
-rwxr--r-- 1 root root 8 Nov 10 19:10 a.txt
[root@test test]# chown test:test a.txt
[root@test test]# ll
total 4
-rwxr--r-- 1 test test 8 Nov 10 19:10 a.txt##更改文件目录也一样,若果想更改文件目录及目录下所有文件的权限,可加-R参数
[root@test test]# chown -R test:test test/

8、tree-以树状结构列出目录内容

8.1 基本用法

##通常不是在某些Linux发行版中默认安装的,使用前需进行安装
tree /path/to/directory

8.2 实例

[root@test ~]# tree /root
/root
├── anaconda-ks.cfg
├── Desktop
├── Documents
├── Downloads
├── initial-setup-ks.cfg
├── Music
├── Pictures
├── Public
├── Templates
├── test
│   └── a.txt
└── Videos
http://www.tj-hxxt.cn/news/21889.html

相关文章:

  • 网站结构物理搜索引擎营销方法
  • 菏泽网站建设多少钱爱站工具包的主要功能
  • 怎样加入好大夫网站做医生百度客户服务电话
  • 建设银行住房公积网站公司网站怎么建立
  • 重庆江津网站建设广告投放平台排名
  • 湖南省郴州市宜章县常州百度seo排名
  • 网站favicon.ico尺寸百度推广效果
  • 怀化交警网站客户关系管理
  • 织梦做淘宝客网站网络推广的常用方法
  • 做公司的网站付的钱怎么入账百度手机助手
  • 重庆网络安全公司外贸推广优化公司
  • 为什么两学一做进不去网站免费seo优化工具
  • 做外贸要做什么网站济南网站优化排名
  • 沈阳快速建站搭建免费推广网站
  • 解决wordpress更改新域名后网站不能访问的问题怎么样做seo
  • 手机便宜网站建设外包服务公司
  • 北京品牌网站设计毕节地seo
  • 做网站是用wordpress还是DW济南网站优化公司排名
  • 中国建设银行什么是网站用户名推广软件app
  • 游侠相册网页设计作业白城seo
  • jsp网站开发实训深圳海外推广
  • 长春网站关键词排名免费seo视频教学
  • 网站制作新手广州最新发布最新
  • 做游戏任务赚钱的网站万词优化
  • 域名对网站的影响百度seo优化及推广
  • 这样可以做网站网络服务包括
  • 网站备案被恶意注销长春网络优化最好的公司
  • 域名备案网站名称免费合作推广
  • 重庆政府采购网站官网北京seo方法
  • 如何做好精准营销虞城seo代理地址