每天一个小命令(2) pwd,cd,date

pwd :显示当前工作目录
-L :不管是否有链接文件,都显示当前目录
-P :若有链接文件,则显示链接文件最终指向的文件
cd : 切换工作目录
~ 切换家目录
- 切换上一个工作目录
… 切换上一级工作目录
date :显示/修改系统时间或日期
date [option] [+FORMAT] #FORMAT: 年月日 %Y-%m-%d
-d “string” :显示指定的日期或时间
-s “string” :设定指定的日期活时间
#:显示2020年1月15日22点13分54秒
date -d “2020-1-15 22:13:54” #若不指定具体的时间,则会显示为00:00:00
#设定系统时间为2020年5月12日13点14分15秒
date -s “2020-5-12 13:14:15”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure, I'd be happy to help! Here are the results of the commands you asked for: 1. pwd: This command stands for "print working directory" and it displays the current directory that you are in. For example, if you type "pwd" in the terminal, it will show you the full path of the current directory that you are in. Output: /home/user/Desktop 2. ls: This command stands for "list" and it displays the files and directories in the current directory. For example, if you type "ls" in the terminal, it will show you the list of files and directories in the current directory. Output: file1.txt file2.txt directory1 directory2 3. cd: This command stands for "change directory" and it allows you to change the current directory that you are in. For example, if you type "cd directory1" in the terminal, it will change the current directory to directory1. 4. mkdir: This command stands for "make directory" and it allows you to create a new directory. For example, if you type "mkdir new_directory" in the terminal, it will create a new directory called "new_directory" in the current directory. 5. cp: This command stands for "copy" and it allows you to copy files or directories from one location to another. For example, if you type "cp file1.txt directory1" in the terminal, it will copy the file "file1.txt" to the directory "directory1". 6. date: This command displays the current date and time on your system. Output: Fri Aug 20 10:45:30 IST 2021 As for your second question, I'm sorry but I'm not able to answer that.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值