Tagged: rm

How To Remove or Delete A Directory In Linux? 0

How To Remove or Delete A Directory In Linux?

Linux provides different commands in order to remove or delete directories and files. But in some cases, this may not work as expected and we can get a message like rmdir: ‘dir’ Directory no empty which simply means when we try to delete a directory with rmdir command it is not completed. In this tutorial, we will learn how to remove and delete an empty or full directory. Remove with...

How To Delete File In Linux? 0

How To Delete File In Linux?

Deleting files in Linux can be sometimes tricky. We have a tool named rm which is the shortcut for the remove word. In this tutorial, we will look at how to remove or delete a file in Linux with different examples and way. rm Command Syntax rm  command syntax is the same as the most the Linux command. We can provide options before specifying the file and directories we cant to...


What Does “rm -rf” Command Do In Linux?

rm is very useful command. We can use rm command with different options. The -rf  options are one of the most used options to remove files and folders. In this tutorial we will examine the -rf options and related issues. Recursive with -r -r is used for recursive. The default behavior of rm  command is just removing given path contents. If we have multilevel directory hierarchy and we want to remove all of them...


How to Deal With Dashed File Names Like Open, Remove?

Dash (-) have important role in Linux and other operating systems. It is used by commands to specify options and arguments. This popular use case may create problems if we have files those provides dash. Linux commands generally need explicit operations to cope with file names those starts with dash. Create File Name Starts with Dash We will start by creating a file which name starts with a dash – ....


How To Remove Symbolic Links In Linux?

Symbolic links provides practical solutions file name or path related problems. Symbolic links will create same file or folder with different name and path. In some situations this may cause problem and we have to remove and delete symbolic link. List Symbolic Links We can start by listing existing links especially symbolic links with ls command like below. Symbolic links provide some redirect to the source file like symbolic link...


How To Delete Empty, Nonempty Directory In Linux

Linux file system consist of directories. A system administrator generally work with directories and related operations. In this tutorial we will look how to delete empty or nonempty linux directories. Delete or Remove Empty Directory We can remove or delete empty directories with rmdir command. In this example we will remove the empty directory named stuff .

Delete Or Remove Empty and Multilevel Directory If our empty directories are in hierarchical...


Useful Linux Commands A System Administrator Should Know

Linux is command based operating system. Most of things are done in cli based environment bash . In this tutorial we will look popular and useful commands used by Linux system administrators and user. You can access detailed tutorials simply clicking links below. tr tr command is used to translate or delete characters in the given text. Linux tr Command Tutorial With Examples ps ps command is used to list and get detailed...


Linux rm Command Tutorial With Examples

Linux is a file based operating system and actually everything is a file. Sometimes we need to clear our server from some of files. How can we achieve that? There are alternative ways to delete files but the most popular command is rm . Remove File rm command definition is remove files or directories. By default rm command do not remove directories. In this example we will remove file named test

Remove Recursively...


Linux Directory and File Operations

Most basic Linux usage start with Linux file and directory operations. We will look these operations to cover basics. List Directories and Files Start of the navigation in file system starts with listing the directories and files

List Hidden Files and Directories All operating systems have hidden files to hide it from used. It is not security related feature. It it related about operation and reliability. Showing configuration files...


How To Remove Files Older Than 1 Day/1 Week/1 Month Recursively

We are decent with scripting language bash and not now hot to remove older files for example 1 day. rm command do not have this type of option to use easily. I think adding this type of feature make a lot of system administrators more happy. Remove Older Than 1 Day We will use following find command example which is explained in detail below.

find is the command we...

Enjoy this blog? Please spread the word :)