Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

to make hidden file or folder

Discussion in 'Single board computers' started by Tevfik_Kursun, Apr 25, 2018.

  1. Tevfik_Kursun

    Tevfik_Kursun New Member

    Joined:
    Apr 25, 2018
    Messages:
    6
    Likes Received:
    6
    Hallo,
    How can I change the attributes of a file or folder?
    Thank you


     
  2. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    1,070
    Likes Received:
    1,029
    Hi Tevfik, and welcome! Making a file or folder "hidden" in Linux is easy.... just rename it to begin with a "dot" (period). Hidden files are often called "dotfiles" for this reason. Then, to see them in your file manager, use CTRL-H to toggle them into view and back to hidden. If you go into your home folder and CTRL-H, you will find many hidden files and folders there already.

    If you want to see hidden files from the command line, use the -a option, like this:
    Code:
    ls -a
    Cheers
     
  3. Rob

    Rob Administrator
    Staff Member

    Joined:
    Oct 27, 2011
    Messages:
    211
    Likes Received:
    621
  4. Tevfik_Kursun

    Tevfik_Kursun New Member

    Joined:
    Apr 25, 2018
    Messages:
    6
    Likes Received:
    6
    Hello,
    I am using Samba, GNU coreutils 8.26
    I have found this in forums
    select Jpg.
    map hidden = yes

    but it didn't work, I thing hidden is not a command for Samba.
    Thanks to all
     
  5. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    1,070
    Likes Received:
    1,029
    Samba is a networking protocol so that Linux can communicate with Windows, and do file transfers, etc. I don't think that it has any inherent ability to "hide" files... that is more of a filesystem and/or permission capability, and each operating system hides files differently. See this for more details about how Windows/Linux/Mac each do it their own way.

    So, basically, I don't think it is possible to use Samba to copy a file that is hidden with Linux (a dot-file or dot-folder) to a Windows partition and have it automatically be hidden in Windows too. However, after you copy a Linux dot-file/folder to Windows, you can then change the attributes of the file/folder so that it will also be hidden in Windows. You will have to manually do this, or create a batch file to help automate the process. See this and this for a little more information.

    Perhaps a BASH script from Linux could be used more effectively than a batch file from Windows, but that goes well beyond my skills. :eek::confused::D

    Cheers
     
    wizardfromoz likes this.
  6. Tevfik_Kursun

    Tevfik_Kursun New Member

    Joined:
    Apr 25, 2018
    Messages:
    6
    Likes Received:
    6
    Hello,
    Thank you for your interest first. I have done it and it works very properly.
    Of course, I am already a beginner, and sure I will learn much more thing in time.
    Thanks to the Forum too.
    Cheers
     
    atanere likes this.
  7. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    1,070
    Likes Received:
    1,029
    Great! Please let us know what you did so we all can benefit and learn. Thanks!
     
  8. Tevfik_Kursun

    Tevfik_Kursun New Member

    Joined:
    Apr 25, 2018
    Messages:
    6
    Likes Received:
    6
    Hello,
    To hide the files and folders, I put a dot in front of the name of the files and folders. (example, old folder name Photo, new .Photo)
    To change the attribute of files and folders, first I have learned admin password. Then I used the commands, row by row as;
    sudo "password"
    cd "name of folder"
    chmod 744 "file name"

    That's all.
    Thank you for all again
    Cheers
     
    wizardfromoz, CptCharis and atanere like this.

Share This Page