answersLogoWhite

0

How do you delete a file or directory in Linux?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

rm filename

or

rm -r directoryname

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you delete a file or directory in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the main file directory in Linux?

It is the Home Directory.


How do you move files to a directory in Linux?

mv file /path/to/directory


What is the name of the Linux top level directory of the file system?

The /, or root directory.


Which Linux command will delete a directory as well as all its files and sub directories?

rm -rv /path/to/directory


How do you delete all files using Linux?

rm -rf <path to directory>


What is the Linux Filesystem hierarchy used for?

The Linux Filesystem Hierarchy is used to help determine the file structure in the Linux Operating System. It defines the Directory structure and directory contents.


What are hardlinks and softlinks used for in Linux?

Alternate references to a file/directory.


What is the command is used to remove directory in Linux?

Assuming the directory is in your Home directory use: rmdir directory-name This will fail if there are files within the directory. In this case, use rm -r directory-name.


What does a dot preceding a file name in Linux mean?

It means that the file or directory is used for application settings.


How long can the total path to a particular file be in Linux from root directory?

4096


Which Linux folder is the default location for the Apache file directory?

/etc/apache2


What are five unix commands?

cp - copy a file rm - delete a file mv - rename a file mkdir - create a directory rmdir - remove a directory etc...