Required for Linux Certification: RHCE lab notes

Source: Internet
Author: User
Tags touch command
Unit 3 estimation of experiment files and directory operations: 1 hour and 30 minutes objective: familiar with the use of files, number of directory operation commands, syntax, and several files. The experiment combines these commands into a common user task. Preparations before the experiment: Prepare an installed RedHatLinux system and a non-privileged account named student. The password is student. Check the Guide to check whether the account already exists in the system. If your student account has not been created, perform the following operations: Unit 3 lab
File and directory operations
Estimated time: 1 hour and 30 minutes
Objective: To familiarize yourself with the number, syntax, and usage of files and directory operation commands. The experiment combines these commands into a common user task.
Preparations before the experiment: Prepare an installed Red Hat Linux system and a non-privileged account named student. The password is student. Check the Guide to check whether the account already exists in the system. If your student account has not been created, perform the following operations:
1. Log On As A root user
2. Enter # useradd student
3. Input # passwd student
Changing password for user student
New UNIX password: {enter student here}
Bad password: it is based on a dictionary word
Retype new UNIX password {re-enter student}
Passwd: all authentication tokens updated successfully
Tutorial 1: Directory and file management
Hypothesis:
You have collected a lot of files in your home directory, and you think it is time to sort them out. You plan to create several new subdirectories and copy or move them to suit your arrangement. In addition, there are some files you don't need at all. You want to delete them.
Task:
1. log on to tty1. The password is student.
2. After logging on, you should be in your home directory. Run the "print working directory" command to verify the configuration.
$ Pwd
/Home/student
3. Run the following command to check whether there are any files in the home directory:
$ Ls
$ Ls-
$ Ls-al
Why does the first and second commands return different numbers of files?
From the output of the third command, you can see which file is the largest in your current home directory?
Is there a subdirectory in the home directory?
4. You will use the touch command to create some files required for this experiment. The specific questions about this command will be described in future chapters. Now, you just need to simply print out the following command (including curly braces {} and a few underlines _).
$ Touch {report, memo, graph }_{ sep, oct, nov, dec }_{ a, B, c} {1, 2, 3}
5. Use the ls command to check the effect of the previous command. You should find 108 in your home directory (Wow ......) Create a new empty file. These files are the data files required for subsequent experiments. If these files are not available, subsequent experiments cannot be continued.
6. To manage your files, you must create new subdirectories. Run the mkdir command to create a direct subdirectory of your home directory:
$ Mkdir "A Reports"
$ Mkdir September October November December
Run the ls command again to check your work.
7. create other directories in the subdirectory you created. Run the following command:
Enter one of the following lines:
$ Cd A \ Reports/
Or
$ Cd "A Reports "/
Changed the current directory. Then:
$ Mkdir 1 2 3
Run the ls command to verify that you have three subdirectories in the "A Reports" Directory: 1, 2, and 3.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.