The second experiment , Linux system is simple file manipulation commands
project |
content |
This work belongs courses |
|
Where this requirement in the job |
|
Student ID Name |
17041418- Liu Bolin |
Job learning objectives |
(1) Learning command line operations in Linux terminal; (2) Common control and command-line operation through command-line operation to solve simple problems |
The first to open the terminal
They find in their own systems in a customary way to open it, but also to understand the common terminal open way, because you might have to operate on someone else's machine.
(1 ) view the current directory
Q: prompt difference between the $ and #?
A: prompt $ custom user # is the system root.
(2) to create a directory named own student number in the user's home directory (home directory) below and see if you successfully created
( 3 ) enter with their student ID named directory, view the current directory, and then create their own full name directory named
Q: The difference between relative and absolute paths are?
Absolute path from the root directory of the beginning of the relative directory is relative to the current directory itself.
( 4 ) create a file in a subdirectory of the current directory and name a.txt
Q: What is the role of touch command if the file already exists will produce?
A: modify the file creation date.
( 5 ) into the first subdirectory current directory, and then displays the current directory and list the contents of the current directory, and file a.txt write a string Hello World
Q: figure symbol> What does that mean?
A: indicates the position of the "Hello World" written.
( 6 ) to return to their student number directory named, see tree whether the command can be used, can not be used, install tree , use this command after a successful installation
sudo apt install tree ### which is mounted tree Ubuntu system terminal command
sudo yum install tree ### which is centos system command tree of the terminal mounting
( 7 ) the first subdirectory of the current directory a.txt copied to the second subdirectory, then again the first subdirectory a.txt copied to a third subdirectory named b.txt Finally, the first subdirectory a.txt rename c.txt . By tree view the current situation directory command.
Q: cp and mv respectively illustrate the use of?
cp can copy a file to another can also name their weight
mv can move files or rename
( 8 ) the / etc directory files passwd copy to your own student number named folder.
( 9 ) with a head view passwd file before 5 line content, with the tail view passwd after the file 5 rows content
( 10 ) Under delete student number file named passwd file, delete the current directory and the third sub-folder
Q: What's the command file to see? And brief description of the method used
rm -rf file name can be forced to delete the file.