• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to make rm -fr command to be interactive

December 31, 2013 by Sharad Chhetri Leave a Comment

In this post I am sharing the tip, how to make rm -fr command to be interactive. As we know if you hit the command rm along with switch -fr ,it will remove the files and directory recursively. Sometimes because of human mistake any important file or directory can be removed.
When you hit the command rm -fr it will not ask any question and it will remove the file or folder. To avoid such kind of mistake it is good to have interaction of question before removing any file/directory.

To make rm -fr command to be interactive ,create a blank file named -i in that directory where important directory/file exists. You can also create -i file in / .By this method, before recursively and forcefully removing the directories and files,it will first ask question to be removed

touch ./-i

Reference

interactive-rm-command

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Non interactive ,without typing password do ssh to Server : By sshpass
  2. How To Find Absolute Full Path Of Command On Linux / Unix : which command
  3. type Command : Display Information About Command Type On Linux
  4. semanage command not found in CentOS 6 and RHEL 6
  5. Allow only members of Wheel group to use su command on RHEL/CentOS
  6. Search keyword in all available man pages – man command
  7. remove html tags by using sed command
  8. FAQ on CentOS 7 / RHEL 7 : Alternate of ifconfig command
  9. Linux : clear command and its keyboard shortcut
  10. smbpasswd command not found on CentOS 7 and RHEL 7

Filed Under: Linux Commands Tagged With: dangerous command, linux, linux command, rm

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Linux Commands

grep command to remove blank lines from file

How to test rpm package before installation

grep command to find multiple strings or keyword from file

sed command to display text between two strings or keywords

Allow only members of Wheel group to use su command on RHEL/CentOS

How to extract RPM package on Linux system

How to install libxml2 and libxslt packages on CentOS 6.5

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

SSH WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

This kernel requires an x86-64 CPU but only detected an i686 CPU

Non interactive ,without typing password do ssh to Server : By sshpass

How to empty Trash through command line in Ubuntu

Allow wget and yum in iptable

linux release renew dhcp assigned ip address

Convert hyphen to underscore in between all filenames shell script

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy