tailieunhanh - Writing a Script File in Linux

The members of the Engineering Department are working on some important documents that need to be backed up frequently. This involves a repetitive process that requires them to type a long list of commands every time they need to perform a backup. Instead of typing all these different commands individually each time, a script file can be written to execute all of them with one command. | Lab Writing a Script File in Linux Estimated Time 25 minutes Objective Upon completion of this lab the student will be able to create a script file and run it in the Linux environment. Equipment The following equipment is needed in order to complete this lab A lab computer with Linux installed and running. Scenario The members of the Engineering Department are working on some important documents that need to be backed up frequently. This involves a repetitive process that requires them to type a long list of commands every time they need to perform a backup. Instead of typing all these different commands individually each time a script file can be written to execute all of them with one command. Procedures Basic knowledge of the command line and the vi editor will be utilized in this lab. In the first step of this lab the student will log on to the system with the root account and create the script. In the second step of the lab the student will assign permissions on the script so that only the specified users can execute it. Then in the third step of this lab the student will log in with the studentXX account and execute the script. Background on the Linux .tar and .gz Extensions When a .tar tape archive file extension is seen someone has bundled two or more files together usually for backup purposes . When a .gz extension is seen the file has been compressed similar to the .zip extension in DOS . For example to archive a folder of WordPerfect files in a wp directory use the following command tar -cvf wp To see all the files use the following command 1 - 4 IT Essentials II - Lab Copyright 2002 Cisco Systems Inc. tar -tvf the -t will list all the files To extract all the files use the following command tar -xvf the -x extracts the contents The following is a list of flags that are used with the .tar command -c Create a new archive -t List the contents of an archive -x Extract the contents -f Write the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.