Creating, Moving, and Deleting Files

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will practice creating, moving, and deleting files. the ability to create, move, and delete files and folders is a necessary step in working with a Linux filesystem. By the end of this lab, the student will be familiar with creating, moving, and deleteing files and folders in Linux.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Copy/Move the Requested Files and Folders
  1. Copy ~/Practice/Test to ~/Report/.
    cp -R Practice/Test/ Report
  2. Rename and move ~/Report/sos_commands/filesys/mount_-l to ~/Report/mounts.txt.
    cd Report/
    mv sos_commands/filesys/mount_-l mounts.txt
Remove the Requested Files and Folders
  1. Remove etc/selinux/.
    rm -rf etc/selinux/
  2. Remove var/log/boot.log.
    rm -rf var/log/boot.log
  3. Remove anything in proc/ that is or starts with a number.
    rm -rf proc/[1-9]*
  4. Remove anything in etc/ that ends in .conf.
    rm -rf etc/*.conf
  5. Remove anything in sys/module that starts with ip6t.
    rm -rf sys/module/ip6t*
Create a New File in `~/Report/`
  1. Create a new file named Done.txt in ~/Report/.
    touch Done.txt

Additional Resources

Your instructor has asked you to demonstrate your knowledge of creating, deleting, and moving files and folders by working through the following scenarios:

Copy/move the following files and folders:

  • Copy ~/Practice/Test to ~/Report/.
  • Rename and move ~/Report/sos_commands/filesys/mount_-l to ~/Report/mounts.txt.

Remove the following files and folders within ~/Report/:

  • etc/selinux/
  • var/log/boot.log
  • Any directories in proc/ that are or begin with a number
  • Any files in etc/ that end in .conf
  • Any directories in sys/module that start with ip6t

Create a new file in ~/Report/:

  • Create a new file named Done.txt in ~/Report/.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?