CD Switch Directory
CD Catalog
- [[Email protected] ~]# CD/
- [[email protected]/]# ls
- Application bin class Dev home lib64 media nfsbackup opt python sbin server sys usr
- Backup boot data etc lib Lost+found mnt oldboy proc root selinux srv tmp var
- [Email protected]/]# cd/tmp
- [[email protected] tmp]# ls
- Yum_save_tx-2017-10-12-23-03cskn4p.yumtx
PWD shows your current location showing your current working directory
Pwd
The path you are in
- [Email protected] tmp]# pwd
- /tmp
- [Email protected] tmp]# CD/USR
- [[Email protected] usr]# CD bin
- [Email protected] bin]# pwd
- /usr/bin
mv Move file or directory modify filename
MV File name Destination directory
- [[email protected] tmp]# ls
- 1.txt YUM_SAVE_TX-2017-10-12-23-03CSKN4P.YUMTX
- [Email protected] tmp]# MV 1.txt/root
- [Email protected] tmp]# Cd/root
- [[email protected] ~]# ls
- 1.txt anaconda-ks.cfg anaconda-ks.cfg_q Install.log install.log.syslog
- [Email protected] ~]#
Touch Create File
Touch file name
- [[email protected] tmp]# Touch 1.txt
- [[email protected] tmp]# ls
- 1.txt YUM_SAVE_TX-2017-10-12-23-03CSKN4P.YUMTX
File View Files Properties
File File name
- [email protected] tmp]# LL
- Total 4
- -rw-r--r--1 root root 0 Nov 21:15 1.txt
- -RW-------1 root root 1135 Oct 23:03 yum_save_tx-2017-10-12-23-03cskn4p.yumtx
- [[Email protected] tmp]# file yum_save_tx-2017-10-12-23-03cskn4p.yumtx
- Yum_save_tx-2017-10-12-23-03cskn4p.yumtx:ascii text
- [[Email protected] tmp]# file 1.txt
- 1.TXT:ASCLL text
ASCII file ASCII text text file
mkdir Creating a Directory
mkdir Directory Name
- [Email protected] tmp]# mkdir yyy
- [email protected] tmp]# LL
- Total 12
- -rw-r--r--1 root root 5 Nov 21:26 1.txt
- -RW-------1 root root 1135 Oct 23:03 yum_save_tx-2017-10-12-23-03cskn4p.yumtx
- Drwxr-xr-x 2 root root 4096 Nov 21:29 yyy
Linux 150 command file and Directory Operations Command CD PWD CP MV Touch