SIMULATIONFind the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile.
Answer(s): A
# cat /etc/testfile | while read line;doecho $line | grep abcde | tee -a /tmp/testfiledoneORgrep `abcde' /etc/testfile > /tmp/testfile
SIMULATIONCreate a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.
# fdisk /dev/sdap(check Partition table)n(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions) Enter+2GtlWpartx -a /dev/sdapartprobemkswap /dev/sda8Copy UUIDswapon -avim /etc/fstabUUID=XXXXX swap swap defaults 0 0(swapon -s)
SIMULATIONCreate a user named alex, and the user id should be 1234, and the password should be alex111.
# useradd -u 1234 alex# passwd alexalex111alex111ORecho alex111|passwd -stdin alex
SIMULATIONInstall a FTP server, and request to anonymous download from /var/ftp/pub catalog. (it needs you to configure yum direct to the already existing file server.)
# cd /etc/yum.repos.d# vim local.repo[local]name=local.repobaseurl=file:///mntenabled=1gpgcheck=0# yum makecache# yum install -y vsftpd# service vsftpd restart# chkconfig vsftpd on# chkconfig --list vsftpd# vim /etc/vsftpd/vsftpd.confanonymous_enable=YES
SIMULATIONConfigure a HTTP server, which can be accessed through http://station.domain40.example.com. Please download the released page from http://ip/dir/example.html.
# yum install -y httpd# chkconfig httpd on# cd /var/www/html# wget http://ip/dir/example.html# cp example.com index.html# vim /etc/httpd/conf/httpd.confNameVirtualHost 192.168.0.254:80<VirtualHost 192.168.0.254:80>DocumentRoot /var/www/html/ServerName station.domain40.example.com</VirtualHost>
Post your Comments and Discuss RedHat EX200 exam prep with other Community members: