Print Friendly and PDF
1. Create a directory ~/touched and enter it. mkdir ~/touched ; cd ~/touched 2. List the files in the /bin directory ls /bin 3. Create the files today.txt and yesterday.txt in touched. touch today.txt yesterday.txt

1. Create a directory ~/touched and enter it. mkdir ~/touched ; cd ~/touched

2. List the files in the /bin directory  
ls /bin

3. Create the files today.txt and yesterday.txt in touched. 
touch today.txt yesterday.txt

4.Change the date on yesterday.txt to match yesterday's date. 
touch -t 200810251405 yesterday.txt

5. Copy yesterday.txt to copy.yesterday.txt 
cp yesterday.txt copy.yesterday.txt

6.Rename copy.yesterday.txt to kim 
mv copy.yesterday.txt kim

7. List the files in the /bin directory 
ls /bin

8.Create a directory called ~/testbackup and copy all files from ~/touched in it. 
mkdir ~/testbackup ; cp -r ~/touched ~/testbackup/

9. Display the type of file of /bin/cat, /etc/passwd and /usr/bin/passwd. 
file /bin/cat /etc/passwd /usr/bin/passwd

10. Use one command to remove the directory ~/testbackup and all files in it. rm -rf ~/testbackup
zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: