Experiment two Linux operating system commonly used commands

1, Q: prompt difference between the $ and #? 

Answer: there is no real difference between the two, # represents the root privileges, $ behalf of ordinary users

2, (1) how to list the current directory of all the files? (Screenshot)

(2) how to list the contents of the current directory as a list? (Screenshot)

What (3). .. and represent?
A: (1) the ls command input, as in FIG.
(2) can enter ls -l commands listed in the content list form, as shown below

 (3) a point representative of the current directory, two representatives of the parent directory point ..

3, (1) the difference between relative and absolute paths are?

     (2) how to return the user's home directory (home directory) from the current directory? (Screenshot) (there are many ways)
     (3) How do I delete a directory? (Screenshot) (you can create a temporary directory and then delete)
A: (1) a relative path from the current directory operations performed thereby selecting a directory, an absolute path directly back to the root directory of directory selection
       (2) Direct input cd / home /, as in FIG.
             
         (3) assuming the Delete directory named xx, xx rmdir command input can, as FIG.
         
 
 

4. What is the role of touch command if the file already exists will produce? 

A: If the file after the touch command time the file is changed to the current time property already exists

5, reference numeral> What does that mean? 

A: Indicates a point to play a role in this phrase written to the specified file, as shown below
6、

7, respectively, illustrate the use of cp and mv? And with screenshots description

A: cp: Copy the file to a directory to another directory, such as cp hao / a.txt shao / copy hao directory on behalf of shao a.txt file directory to send, as shown below
mv: rename or move a directory, such as mv hao / a.txt hao / c.txt behalf of the hao a.txt directory file is renamed c.txt, following FIG.
 
 
 
 

 

Guess you like

Origin www.cnblogs.com/bush-on-hide/p/12434226.html