top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the commands to make a file hidden and to delete all hidden in the folder in Linux?

+3 votes
365 views

What are the commands to make a file hidden and to delete all hidden in the folder in Linux? Please explain in detail?

posted Feb 2, 2016 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Try this to make a file hidden:

mv filename .filename (you can also specify a path for the hidden file, but as it is here, it will stay in the same directory)

The line above just moves the file with "mv" command, but renames it with a period at the beggining of its name which will make it hidden.

And to delete all hidden files within a directory:

rm -f -v .*

This will delete all files whose names start with a period i.e. Hidden files.

answer Feb 2, 2016 by Ronald Hudson
Similar Questions
+1 vote

say directory name is di* then how to delete it?

+1 vote

In my knowledge, both commands are used to get the details of Linux system. But I want to know the difference between these two and when to use which one ?

...