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

wordpress 产品链接湖南seo推广系统

wordpress 产品链接,湖南seo推广系统,如何建设销售型企业网站,佛山网站维护💥1、Linux基本指令 1.1 mv 指令 mv指令是move的缩写,用来移动或重命名文件、目录,经常用来备份文件或目录。 mv old_name new_name: 重命名文件或目录mv file /path/to/directory: 移动文件到指定目录 roothcss-ecs…

💥1、Linux基本指令

1.1 mv 指令

mv指令是move的缩写,用来移动或重命名文件、目录,经常用来备份文件或目录。

  • mv old_name new_name: 重命名文件或目录
  • mv file /path/to/directory: 移动文件到指定目录
root@hcss-ecs-8f13:~/112# ls -l
total 8
drwxr-xr-x 2 root root 4096 Sep 16 20:13 dir
-rw-r--r-- 1 root root   78 Sep 16 20:04 test.c
root@hcss-ecs-8f13:~/112# mv test.c name.c
root@hcss-ecs-8f13:~/112# mv dir mydir
root@hcss-ecs-8f13:~/112# ls -l
total 8
drwxr-xr-x 2 root root 4096 Sep 16 20:13 mydir
-rw-r--r-- 1 root root   78 Sep 16 20:04 name.c
root@hcss-ecs-8f13:~/112# mv name.c ../
root@hcss-ecs-8f13:~/112# ls -l ../
total 12
drwxr-xr-x 3 root root 4096 Sep 16 20:16 112
-rw-r--r-- 1 root root   78 Sep 16 20:04 name.c
drwx------ 3 root root 4096 Sep 16 11:32 snap
root@hcss-ecs-8f13:~/112# ls -l
total 4
drwxr-xr-x 2 root root 4096 Sep 16 20:13 mydir
root@hcss-ecs-8f13:~/112# mv mydir ../
root@hcss-ecs-8f13:~/112# ls -l ../
total 16
drwxr-xr-x 2 root root 4096 Sep 16 20:16 112
drwxr-xr-x 2 root root 4096 Sep 16 20:13 mydir
-rw-r--r-- 1 root root   78 Sep 16 20:04 name.c
drwx------ 3 root root 4096 Sep 16 11:32 snap
root@hcss-ecs-8f13:~/112# ls -l
total 0
root@hcss-ecs-8f13:~/112# 

1.2 cat 指令

语法: cat [选项] [文件]
功能: 读取文件内容并将其输出到标准输出设备(通常是终端或屏幕)
常用选项:

  1. -b 对非空行输出行编号
  2. -n 对输出的所有行编号
  3. -s 不输出多行空行
root@hcss-ecs-8f13:~/112# pwd
/root/112
root@hcss-ecs-8f13:~/112# touch test.c
root@hcss-ecs-8f13:~/112# ls
test.c
root@hcss-ecs-8f13:~/112# nano test.c
root@hcss-ecs-8f13:~/112# cat test.c
#include <stdio.h>int main()
{printf("hello world\n");return 0;
}
root@hcss-ecs-8f13:~/112# cat -b test.c1	#include <stdio.h>2	int main()3	{4	    printf("hello world\n");5	    return 0;6	}
root@hcss-ecs-8f13:~/112# cat -n test.c1	#include <stdio.h>2	3	int main()4	{5	    printf("hello world\n");6	    return 0;7	}
root@hcss-ecs-8f13:~/112# cat -s test.c
#include <stdio.h>int main()
{printf("hello world\n");return 0;
}
root@hcss-ecs-8f13:~/112# 

cat会把文件中的所有内容显示出来,因此cat不适合看大文本,适合看小文本。

如果cat后什么都不跟,则通常情况下我们从键盘输入什么,屏幕上就输出什么。

root@hcss-ecs-8f13:~/112# cat
hello world
hello world
Are you ok?
Are you ok?

tac指令: 功能和cat相反,逆序打印文件内容。

root@hcss-ecs-8f13:~/112# ls 
mydir  name.c
root@hcss-ecs-8f13:~/112# tac name.c
}return 0;printf("hello world\n");
{
int main()#include <stdio.h>
root@hcss-ecs-8f13:~/112# 

1.3 echo 指令

功能:

  • echo 文本: 在终端(命令行界面)上输出文本
  • echo 文本>文件(如果文件不存在则新建): 将文本写入到文件中
root@hcss-ecs-8f13:~/112# ls -l
total 4
drwxr-xr-x 2 root root 4096 Sep 16 20:13 mydir
root@hcss-ecs-8f13:~/112# echo "hello world"
hello world
root@hcss-ecs-8f13:~/112# echo "hello world">test.txt
root@hcss-ecs-8f13:~/112# ll
total 16
drwxr-xr-x 3 root root 4096 Sep 16 20:41 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 20:13 mydir/
-rw-r--r-- 1 root root   12 Sep 16 20:41 test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
hello world
root@hcss-ecs-8f13:~/112# 

1.4 重定向

Linux下一切皆文件,Linux下,显示器、键盘、网卡、普通文件等都可以看作文件,只不过显示器只有写方法,向显示器打印,其实就是向显示器文件写入,无法从显示器读取数据。键盘只有读方法。而普通文件具有读写两个功能。
echo指令默认把后面跟的文本写入显示器文件中。cat指令后面如果没有跟任何文件,则默认从键盘文件中读取数据,然后写入到显示器文件中。

上面我们用echo 文本>(输出重定向)文件将文本写入到文件中,如果文件不存在则新建

root@hcss-ecs-8f13:~/112# ll
total 12
drwxr-xr-x 3 root root 4096 Sep 16 22:47 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 21:57 dir/
root@hcss-ecs-8f13:~/112# echo "hello world">test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
hello world
root@hcss-ecs-8f13:~/112# echo "Are you ok?" > test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
Are you ok?
root@hcss-ecs-8f13:~/112# echo "aa" > test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
aa
root@hcss-ecs-8f13:~/112# 

通过测试我们还可以得出,如果指定的文件里面有内容,则会先清空原内容,然后再写入(并不是覆盖)。

  • 当文件不存在时,>文件名可以新建空文件
  • 当文件存在时,>文件名可以清空文件内容
root@hcss-ecs-8f13:~/112# ll
total 12
drwxr-xr-x 3 root root 4096 Sep 16 22:58 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 21:57 dir/
root@hcss-ecs-8f13:~/112# >test.txt
root@hcss-ecs-8f13:~/112# ll
total 12
drwxr-xr-x 3 root root 4096 Sep 16 22:58 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 21:57 dir/
-rw-r--r-- 1 root root    0 Sep 16 22:58 test.txt
root@hcss-ecs-8f13:~/112# echo "Are you ok?" > test.txt
root@hcss-ecs-8f13:~/112# ll
total 16
drwxr-xr-x 3 root root 4096 Sep 16 22:58 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 21:57 dir/
-rw-r--r-- 1 root root   12 Sep 16 22:59 test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
Are you ok?
root@hcss-ecs-8f13:~/112# >test.txt
root@hcss-ecs-8f13:~/112# ll
total 12
drwxr-xr-x 3 root root 4096 Sep 16 22:58 ./
drwx------ 7 root root 4096 Sep 16 20:23 ../
drwxr-xr-x 2 root root 4096 Sep 16 21:57 dir/
-rw-r--r-- 1 root root    0 Sep 16 22:59 test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
root@hcss-ecs-8f13:~/112# 

>指定文件写入内容会把原内容删除掉,如果我们就不想删除原始内容,将新内容追加到原始内容后,可以用>>(追加重定向)实现。

root@hcss-ecs-8f13:~/112# cat test.txt
root@hcss-ecs-8f13:~/112# echo "Are you ok?" > test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
Are you ok?
root@hcss-ecs-8f13:~/112# echo "Hello" >> test.txt
root@hcss-ecs-8f13:~/112# cat test.txt
Are you ok?
Hello
root@hcss-ecs-8f13:~/112# 

除了>>>进行输出,还有输入重定向符号<。前面我们说了如果cat后面什么都不跟,则默认从键盘上取数据。所以如果我们用输入重定向符号<指定文件,则会输出文件中的内容。

root@hcss-ecs-8f13:~/112# cat test.txt
Are you ok?
Hello
root@hcss-ecs-8f13:~/112# cat < test.txt
Are you ok?
Hello
root@hcss-ecs-8f13:~/112# 

http://www.khdw.cn/news/11959.html

相关文章:

  • 做网做网站建设短视频精准获客系统
  • 红酒 网站 模板高级搜索引擎技巧
  • wordpress 安装 404seo教程搜索引擎优化入门与进阶
  • 如何看小程序是哪家公司做的湖北百度seo排名
  • lamp和wordpress站长工具seo综合查询是什么
  • 各大公司开源网站优化推广网站推荐
  • 网站html5自适应屏幕山西seo谷歌关键词优化工具
  • 做网站域名不备案会怎么样北京网站开发
  • 如何做域名网站南京网站推广排名
  • 免费发布活动的平台北京网站sem、seo
  • 承德网站制作公司哪家好软文时光发稿平台
  • 怎么做符合seo的网站下载百度语音导航地图
  • 网站建设平台合同模板下载电子商务营销方法
  • 网站备案中商城服务性质是什么创建网站需要多少资金
  • 武汉建网站西安百度关键词推广
  • 淘宝联盟怎么自己做网站推广微指数查询
  • 织梦素材网站模板苏州网站建设书生商友
  • 推荐一些能打开的网站五个成功品牌推广案例
  • server2008部署网站seo常用的优化工具
  • 龙港哪里有做百度网站的seo网页优化平台
  • 做网页和网站一样吗免费人脉推广
  • 临沂营销型网站建设网络营销分析报告
  • 宁远县做网站的中国最大的企业培训公司
  • 网站管理难做吗分析网站
  • 网站建设增城新闻发布稿
  • 建广告网站需要多少钱怎样推广自己的广告
  • 郑州网站seo厂家文山seo公司
  • 新疆建设网站首页石家庄seo管理
  • wordpress的页面的直通车关键词怎么优化
  • 找公司做网站注意事项网络营销形式