How to Hide and Rename Files in Terminal

How to Hide and Rename Files in Terminal



One helpful reader sent in a batch of Terminal tricks for renaming files and hiding them. Read on to learn more!

First, using the mv command, you can rename files in Terminal. For instance, if you wanted to rename filename.png to file_1.png, I would type the following command into Terminal:

 

mv filename.png file_1.png

 

You can also hide files and folders using the chflags hidden command, like this:

 

chflags hidden file.png

 

If you wanted to open that hidden file, then you can use the open command, like this:

 

open file.png

 

Or, you could open all files with the same file type in that folder by issuing this command with an asterisk (also called a wildcard):

 

open *.png

 

Easily open your hidden files through Terminal with the open command.

 Remember that if you want to make a hidden file or folder visible, you can issue the following command:

 

chflags nohidden file_1.png

 



Read More

            Google+