-1

What are the ways that I can hide files and folders from any directory search ?

For example : (What I will do) Access the remote server through putty Then will show the files inside the folder

(What I WANT to do) To hide the files inside those folder

(What I tried to do) I tried to changed the file permission via FileZilla (Doesn't work) I tried to create a new filter rules via FileZilla (It works but only hides from filezilla)

Thank you for help!

exceptione
  • 101
  • 1
  • 18

1 Answers1

1

What are the ways that I can hide files and folders from any directory search ?

There is no such thing as "hiding a file".

In Windows you can set the hidden or system flag, but this doesn't actually hide the file, it's just a filter for directory search operations that choose to ignore hidden or system files.

They would be invisible to dir but completely visible to dir /ash

In *nix, files that start with a "." are not shown by default but that's also just a convention. They're not actually hidden and are just suppressed by file operations that don't want to show "dot" files.

ls would not show .mysecretfile but ls -la would show it.

Terry Carmen
  • 3,720
  • 1
  • 16
  • 32
  • Thank you Sir for enlightened me. I now understand. By the way, since it is impossible to completely hide the file from dir, is it possible to hide it by setting a password ? – exceptione Jul 30 '18 at 04:17
  • The only way to make a file invisible/inaccessible is to set the file permissions so that the current user doesn't have access. In both Windows and *nix, you can give a different user or group permissions to the file and revoke permissions from the user/group you want to hide it from. – Terry Carmen Jul 30 '18 at 12:45