

{"id":110112,"date":"2022-07-20T10:00:36","date_gmt":"2022-07-20T04:30:36","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=110112"},"modified":"2022-07-20T10:00:40","modified_gmt":"2022-07-20T04:30:40","slug":"rm-command-in-linux","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/","title":{"rendered":"Rm Command in Linux"},"content":{"rendered":"<p>In this article, you will learn all there is to the rm command in Linux. We will be going through various topics like what rm is, why it is used, the syntax of the rm command, and the different options used along with it.<\/p>\n<p>In the end, we will also be looking at some practical commands in the terminal that will help you manage files in Linux using the terminal. So buckle up, and read right till the end!<\/p>\n<h3>What is the rm command?<\/h3>\n<p>Rm stands for remove. The rm command is a command-line-based utility in Linux-based operating systems that helps in removing files and directories from your Linux filesystem from the terminal itself.<\/p>\n<p>By now we all know that there are 2 ways to do almost anything in Linux, one is the GUI and the other is the terminal. The Terminal is all about efficiency and productivity rather than the GIU where you have to click many buttons and navigate through different items. However, in the terminal, there are no extra Clicks on nicks!<\/p>\n<p>We also know that there are many such commands that help in file management, like pwd, cd, ls, mkdir, cp, mv, and rmdir. Rm is one such command used for managing the filesystem, to be more specific, deleting files, directories, symbolic links, and many more from the system.<\/p>\n<p>By default, the rm command is not capable of removing directories, indeed we have a couple of options that we can use with the rm command to specify what it will do, which we will discuss later. The rm command runs silently and you must be very careful of the files you delete because once deleted, you cannot recover them back.<\/p>\n<p>The only disadvantage of the rm command over the GUI is that it does not have a recycle bin like the GUI. Therefore the files you delete using the rm command are gone forever, so double-check the file name before you delete it.<\/p>\n<h3>How does the rm command work?<\/h3>\n<p>We might think that the rm command follows a really simple process of removing files, well, maybe, but let us get a better understanding of what happens behind the scenes.<\/p>\n<p>The removal process of the rm command unlinks a file (that you specified to remove) in a file system from its connected or linked data. It then marks that space on the storage device as \u201cusable\u201d by future writes.<\/p>\n<p>In simpler words, when you delete a file, the data in the files is not changed at all, except it is just no longer associated with a file name. The data of the file is not removed, but after unlinking it using the rm command, it becomes inaccessible.<\/p>\n<h3>History of Linux rm command<\/h3>\n<p>In the initial stages, the rm command was meant to delete only empty directories. In fact, for old time&#8217;s sake, this feature is still available with the usage of the option \u201cd\u201d.<\/p>\n<p>The rm utility that was bundled in the GNU Coreutils was written, designed, and developed by Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering. They also included the option \u201c-d\u201d to provide the exact same functionality of the \u2018rmdir\u2019 command.<\/p>\n<p>The rm command is not available in Linux-based distributions but is also available as a separate package for Microsoft Windows as a part of the UnxUtils . Even the IBM i operating system has been ported with the rm command.<\/p>\n<h3>Syntax of Linux rm command<\/h3>\n<p>Now that we are finished up with the theory part, let us touch on the practical part. Let us start by looking at the syntax of the rm command:<\/p>\n<p>rm &lt;options&gt; &lt;file name&gt;<\/p>\n<h3>Options used with the rm command<\/h3>\n<p>In the syntax, there is a field for the options, where we can choose different options to specify what and how the rm command should function. Let us go through the options that are used with the rm command:<\/p>\n<p><strong>1. -f<\/strong><\/p>\n<p>This option ignores nonexistent files and does not prompt while removing the file. You can also write this option as \u201c&#8211;force\u201d<\/p>\n<p><strong>2. -i<\/strong><\/p>\n<p>This option prompts you before the removal of every file. It basically acts as you confirming to really delete that file.<\/p>\n<p><strong>3. -I<\/strong><\/p>\n<p>This option prompts once before removing more than three files, or when removing files recursively.<\/p>\n<p><strong>4. &#8211;interactive = &lt;when&gt;<\/strong><\/p>\n<p>This option prompts according to the &lt;when&gt; you specify. &lt;when&gt; can take 2 values:<\/p>\n<ul>\n<li>-I &#8211; once<\/li>\n<li>-i &#8211; always<\/li>\n<\/ul>\n<p>If you don&#8217;t specify &lt;when&gt;, the option will take it as \u2018always\u2019.<\/p>\n<p><strong>5. &#8211;one-file-system<\/strong><\/p>\n<p>When you are removing a file hierarchy recursively, this option skips any directory that is on a filesystem different from that of the corresponding command-line argument<\/p>\n<p><strong>6. &#8211;no-preserve-root<\/strong><\/p>\n<p>This option does not treat the root directory (\/) in any special manner<\/p>\n<p><strong>7. &#8211;preserve root<\/strong><\/p>\n<p>This option does not remove the root directory (\/).<\/p>\n<p><strong>8. -r<\/strong><\/p>\n<p>This option removes directories and their contents recursively, you can also write this command as either \u201c-R\u201d or \u201c&#8211;recursive\u201d.<\/p>\n<p><strong>9. -d<\/strong><\/p>\n<p>This option removes empty directories. you can also write this command as \u201c&#8211;dir\u201d<\/p>\n<p><strong>10. -v<\/strong><\/p>\n<p>This option provides verbose to the output to give a better understanding of what happened. you can also write this command as \u201c&#8211;verbose\u201d<\/p>\n<p><strong>11. &#8211;version<\/strong><\/p>\n<p>This option prints out the version information of the rm command you are using.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/version-of-rm.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110252\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/version-of-rm.webp\" alt=\"version of rm\" width=\"780\" height=\"196\" \/><\/a><\/p>\n<p><strong>12. &#8211;help<\/strong><\/p>\n<p>This option prints out the help menu which contains information about the usage of the rm command and information regarding the different options available with the rm command.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/help-menu-of-rm.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110253\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/help-menu-of-rm.webp\" alt=\"help menu of rm\" width=\"780\" height=\"644\" \/><\/a><\/p>\n<p>Now that we have laid down the fundamentals of the rm command, let\u2019s go deeper on the practical side and explore some commands in the terminal.<\/p>\n<h3>Deleting a file<\/h3>\n<p>To simply delete a file, just use the rm command followed by the filename you want to delete.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-a-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110255\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-a-file.webp\" alt=\"deleting a file\" width=\"780\" height=\"127\" \/><\/a><\/p>\n<h3>Providing verbose while deleting<\/h3>\n<p>When you delete a file, the rm command says absolutely nothing, whether it has been successfully deleted or not, If you want a better understanding of what is happening, use the option \u201c-v\u201d to provide verbose.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/providing-verbose-while-deleting.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110256\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/providing-verbose-while-deleting.webp\" alt=\"providing verbose while deleting\" width=\"656\" height=\"146\" \/><\/a><\/p>\n<p>Even If the file you want to delete does not exist, it will tell you so:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/providing-verbose-even-if-file-is-not-deleted.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110257\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/providing-verbose-even-if-file-is-not-deleted.webp\" alt=\"providing verbose even if file is not deleted\" width=\"655\" height=\"119\" \/><\/a><\/p>\n<h3>Deleting multiple files<\/h3>\n<p>If you want to delete multiple files in just one single rm command, you can do so by writing the filenames one after the other separated by a space as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rm &lt;filename-1&gt; &lt;filename-2&gt; &lt;filename-3&gt; &lt;filename-4&gt;<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-multiple-files.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110258\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-multiple-files.webp\" alt=\"deleting multiple files\" width=\"780\" height=\"179\" \/><\/a><\/p>\n<p>If you enter a name of a file that does not exist, rm will remove the remaining files and leave the one that does not exist.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-multiple-files-and-showing-if-some-have-been-failed-to-be-deleted.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110259\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-multiple-files-and-showing-if-some-have-been-failed-to-be-deleted.webp\" alt=\"deleting multiple files and showing if some have been failed to be deleted\" width=\"780\" height=\"143\" \/><\/a><\/p>\n<h3>Ask before deleting a file<\/h3>\n<p>If you want rm to ask you before deleting a file, use the option \u201c-i\u201d as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rm -i &lt;filename&gt;<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/asking-before-deleting-a-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110260\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/asking-before-deleting-a-file.webp\" alt=\"asking before deleting a file\" width=\"780\" height=\"140\" \/><\/a><\/p>\n<p>If you are using the option \u201c-i\u201d while deleting multiple files, it will ask you every single time a file is being deleted.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/asking-before-deleting-multiple-files.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110261\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/asking-before-deleting-multiple-files.webp\" alt=\"asking before deleting multiple files\" width=\"780\" height=\"236\" \/><\/a><\/p>\n<h3>Removing an empty directory<\/h3>\n<p>If you want to remove an empty directory, use the option \u201c-d\u201d or \u201c&#8211;dir\u201d as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rm -d &lt;empty directory name&gt;<\/pre>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-an-empty-directory.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110262\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-an-empty-directory.webp\" alt=\"removing an empty directory\" width=\"646\" height=\"190\" \/><\/a><\/h3>\n<h3>Removing a non-empty directory<\/h3>\n<p>Ok, you now know how to delete an empty directory. Does that mean you can&#8217;t delete a directory that is not empty? Well no, in fact, you can even take things to the next level (which we will see in the next section). If you want to delete a non-empty directory using the rm command, use the option -R for recursively deleting the files.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-a-non-empty-directory.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110263\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-a-non-empty-directory.webp\" alt=\"removing a non empty directory\" width=\"694\" height=\"299\" \/><\/a><\/p>\n<h3>Using a wildcard to delete files of the same kind<\/h3>\n<p>Suppose you want to delete all the .txt files or all the .odt files, you can do so by using the wild card (*) as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rm *&lt;extention&gt;<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/using-a-wildcard-to-delete-files-of-the-same-kind.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110264\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/using-a-wildcard-to-delete-files-of-the-same-kind.webp\" alt=\"using a wildcard to delete files of the same kind\" width=\"780\" height=\"189\" \/><\/a><\/p>\n<p>In the above output, the command only deleted all the \u201c.txt\u201d files and retained the \u201c.odt\u201d files.<\/p>\n<h3>Removing a write-protected file<\/h3>\n<p>Whenever you remove a write-protected file, the rm command will ask you for confirmation. If you want to delete the file without the prompt, pair the rm command with the option \u201c-f\u201d as shown in the output below:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-a-write-protected-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110265\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/removing-a-write-protected-file.webp\" alt=\"removing a write protected file\" width=\"780\" height=\"160\" \/><\/a><\/p>\n<h3>Deleting everything from the current directory<\/h3>\n<p>If you want to delete everything from the file you are currently in, use the wildcard asterisk (*) with the rem command. When I say everything, I mean only files, it will not delete the directories.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-everything-from-the-current-directory.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110266\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-everything-from-the-current-directory.webp\" alt=\"deleting everything from the current directory\" width=\"660\" height=\"183\" \/><\/a><\/p>\n<p>If you observe the output above, the command removed only the files and not the directories.<\/p>\n<h3>Deleting filenames starting with a dash (-)<\/h3>\n<p>If you want to delete files that start with a dash, use the option \u201c&#8211;\u201d along with the rm command as the simple use of rm will not remove such files.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-with-dash.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110269\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-with-dash.webp\" alt=\"deleting filenames with dash\" width=\"668\" height=\"132\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Another way of removing files whose name starts with a dash is to specify the whole path of the file as shown below:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-starting-with-a-dash.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110267\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-starting-with-a-dash.webp\" alt=\"deleting filenames starting with a dash\" width=\"768\" height=\"81\" \/><\/a><\/p>\n<p>Other than the flag \u201c&#8211;\u201d, you can also use \u201c.\/\u201d to remove files starting with a dash as shown below:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-starting-with-dash.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110268\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/07\/deleting-filenames-starting-with-dash.webp\" alt=\"deleting filenames starting with dash\" width=\"666\" height=\"120\" \/><\/a><\/p>\n<h3>Rm vs unlink<\/h3>\n<p>Even the unlink command does exactly what rm does, however, it is strictly defined by the POSIX standard. The main disadvantage of the unlink command is that it can work on only one at a time and also doe nothing to directories.<\/p>\n<p>The worst part of unlink is that there are no options available with it, meaning its behavior can\u2019t be changed at all. The unlink command does only one thing &#8211; performs the unlink system call on one file.<\/p>\n<p>The rm command wins any day as it has all the options and features like safety checks, interactive prompting, conditional deletion, and recursive operation. To sum up, rm is much better and friendlier to use than unlink.<\/p>\n<h3>Summary<\/h3>\n<p>As you have seen the rm command is a simple yet efficient tool to delete files and directories. You have now learned what rm is, how it works, the syntax, options, and practical examples of therm command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn all there is to the rm command in Linux. We will be going through various topics like what rm is, why it is used, the syntax of the&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":110201,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[27035,27033,27036,27034],"class_list":["post-110112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux-rm-command-options","tag-rm-command-in-linux","tag-rm-vs-unlink","tag-syntax-of-linux-rm-command"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rm Command in Linux - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn what linux rm command is, its need, syntax, examples and different options used along with it. See Rm vs unlink in linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rm Command in Linux - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn what linux rm command is, its need, syntax, examples and different options used along with it. See Rm vs unlink in linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-20T04:30:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-20T04:30:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rm Command in Linux - DataFlair","description":"Learn what linux rm command is, its need, syntax, examples and different options used along with it. See Rm vs unlink in linux.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"Rm Command in Linux - DataFlair","og_description":"Learn what linux rm command is, its need, syntax, examples and different options used along with it. See Rm vs unlink in linux.","og_url":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-07-20T04:30:36+00:00","article_modified_time":"2022-07-20T04:30:40+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Rm Command in Linux","datePublished":"2022-07-20T04:30:36+00:00","dateModified":"2022-07-20T04:30:40+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/"},"wordCount":1602,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp","keywords":["linux rm command options","Rm Command in Linux","Rm vs unlink","syntax of linux rm command"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/","url":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/","name":"Rm Command in Linux - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp","datePublished":"2022-07-20T04:30:36+00:00","dateModified":"2022-07-20T04:30:40+00:00","description":"Learn what linux rm command is, its need, syntax, examples and different options used along with it. See Rm vs unlink in linux.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-rm-command-1.webp","width":1200,"height":628,"caption":"linux rm command"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/rm-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"Rm Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=110112"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110112\/revisions"}],"predecessor-version":[{"id":110270,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110112\/revisions\/110270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/110201"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=110112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=110112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=110112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}