Skillset can help you prepare! Sign up for your free Skillset account and take the first steps towards your certification.
James has successfully penetrated into a Linux system and was able to gather the system information and intended to save in a file called 'sysinfo.txt'. However, he accidentally save the file as '-sysinfo.txt' (hyphen sysinfo.txt). To cover his track, he tried to delete the file after successfully downloading it but he wasn't able to do so.
How would you help him to delete the file name starting with a hyphen?
4. del -sysinfo.txt
1. rm '-sysinfo.txt'
3. rm -- -sysinfo.txt
2. rm \-sysinfo.txt
Linux shell will interpret the hyphen as an option prefix.
You can issue: rm hyphen hyphen space hyphen sysinfo.txt
Please note another option would be to use "./"
for example:
rm ./ -sysinfo.txt
Train with Skillset and pass your certification exam. Faster. Guaranteed.
Study thousands of practice questions that organized by skills and ranked by difficulty.
Create a tailored training plan based on the knowledge you already possess.
Know when you’re ready for the high-stakes exam. Have the confidence that you will pass on your first attempt.