Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Commands»Find All files with 777 permission in Linux

    Find All files with 777 permission in Linux

    By RahulAugust 13, 20202 Mins Read

    Right file permission is the most crucial part of the Linux system management. A file with permission 777 is open to everyone for read and write. Any user logged in to system can write to this file. Which can be harmful for your system.

    Advertisement

    In some condition’s, you may required 777 permissions like log file etc. But mostly we don’t required it. This tutorial will help you to search files with 777 permission on your Linux/Unix system via find command.

    Syntax:

    find /path/to/dir -perm 777 
    

    The -perm command line parameter is used with find command to search files based on permissions. You can use any permission instead of 777 to find files with that permissions only.

    For example to search all files with permission 777 under the logged in user home directory, type:

    find $HOME -perm 777 
    

    The above command will search all files and directories with permission 777 under the specified directory.

    Linux command find files with 777 permissions

    But if you don’t want to include directories in this list. Define the type with -type on command line parameter as below. This will search only files with permission 777 under the /var/www directory.

    find /var/www -perm 777 -type f 
    

    Linux command find files only with 777 permissions

    To search directory only, type:

    find /var/www -perm 777 -type d 
    

    Hope this tutorial helps you search files based on permissions and secure your Linux/Unix system.

    file find permission
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Top 10 JQ Commands Every Linux Developer Should Know

    How to Check if a Program Exists in Linux

    How to Create a Directory If It Does Not Exist in Linux

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.