About 6,590,000 results
Open links in new tab
  1. Linux - Is there a way to prevent/protect a file from being …

    Dec 2, 2014 · A file with the i attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a …

  2. Why is it possible to delete the entire file system?

    Feb 12, 2019 · safe-rm prevents the accidental deletion of important files by replacing rm with a wrapper which checks the given arguments against a configurable blacklist of files and …

  3. How to lock a file against deletion but still make it writeable?

    Aug 24, 2011 · Indeed there are Linux commands to create a 'sparse' file full of zeros. For Windows: Deny "Delete" permission on the file. Remove or deny "Delete child items" …

  4. How to Lock a File for Renaming/Deleting in Linux - Tecmint

    Feb 3, 2025 · One of the simplest and most effective ways to protect a file from renaming or deletion is to use the chattr command, which changes file attributes in Linux. First, let’s check …

  5. How do I make it impossible to delete important system files and ...

    Mar 9, 2022 · By default Windows hides important system files so that they won't be mistakenly deleted by the user. However In Linux the only thing stopping you from deleting essential …

  6. How to delete a file using rm command in Linux / Unix

    Aug 15, 2024 · To remove or delete a file or directory in Linux, FreeBSD, Solaris, macOS, or Unix-like operating systems, use the rm command or unlink command. This page explains …

  7. Ways to Permanently and Securely DeleteFiles and Directories’ in Linux

    Oct 21, 2024 · In Linux, the Secure-delete command is used to delete a file from your filesystem. When you run it in a terminal like this: "ls -l | tr '\r ' foo1" that will print all the files we are …

  8. Prevent certain files from being moved or deleted by a user

    Oct 29, 2016 · You only need to do this in your home directory as the system files in /etc, /var or /usr are already set the way you want by default: You can remove the write permission of the …

  9. How to prevent directory from being deleted by user?

    To prevent a directory from being deleted by the user which owns all rights to the parent directory (/home/pandya in your case) you have to use the chattr command. Here is an example: And in …

  10. Unable to delete file - no such file or directory - Ask Ubuntu

    Jul 15, 2012 · Now, you can try to delete the file. This can result in severe filesystem corruption. Note that this can be done even if it turns out the file never had an inode.

Refresh