Linuxzoo Wildcard Questions
Question 1: Update demo account
If you have just completed all the previous questions you need not use this setup button. However, if you have skipped part or all of the previous questions, or when you ran your virtual machine the demo account was missing, then the button below will create the demo account and create the files which the previous questions would have had you create.
By pressing the button below a new account is created called "demo", password is also "demo". Log in using this account and you cannot do any damage. If you mess the account up and want to start again, just press the button again.
Once created, you can log into this account using telnet or ssh, logging into the hostname linuxzoo.net. Remember the username is demo and the password is demo. And remember, you cannot break anything using this account! The account begins with an empty directory, so dont be shocked that "ls" shows nothing...
Question 2: Wild copy
In the demo account, cd to the home directory (/home/demo). From there copy all files using the * wildcard that contain the word file in the filename into the work directory. Confirm this using ls.
Question 3: Duplicate thismonth
Copy the file thismonth to the letters directory and rename it let1.doc. Change the current working directory to the letters directory and copy let1.doc to let2.doc. Copy once more let1.doc to let3.doc. Confirm this yourself using the ls command.
Question 4: Copy and rename
Copy using the ? wildcard the three files let1.doc, let2.doc, and let3.doc from the letters directory to the work/misc directory. Once copied, rename the new files (the ones in the misc directory) into rpt1.doc, rpt2.doc, and rpt3.doc. When renaming, you have to do this explicitly and not try to use a wildcard. It would appear at first that a wildcard could make the renaming easier, but it turns out to be ridiculously hard to use a wildcard in this case.
Question 5: Square Brackets
Using square brackets, move all the files from the misc directory that contain the numbers 2 or 3 into the scripts directory.
Question 6: rm
Remove all files beginning with the letter "r" from the scripts directory. Use the -i option to see what you are about to delete before then agreeing to delete the files involved.
Question 7: Hard link
Create a hard link in progs called biglink, which is a hard link to the bigfile file in your home directory.
In "ls -l bigfile" the hard link count should be 2. If you make mistakes and create links with the wrong name or in the wrong place you will be marked wrong until you fix the problem.
Question 8: Soft link
Create a soft link in progs called mylink, which is a relative soft link to the thismonth file in your home directory.
Question 9: Soft link - absolute
Create a soft link in progs called mylink2, which is a absolute soft link to the thismonth file in your home directory.