Episode 3: Hidden Folders (Terminal 101)
Filed in Tutorials, Podcasts by TheSage at 7:21 am No Comments »In this episode The Sage shows you how to create hidden folders using the command line (difficulty level: intermediate).
You can watch this episode here
How do we do it?
- Open up Terminal. Terminal can be found in Applications/Utilities/Terminal.app. To do so, in Finder press ⌘-Shift-U to open the utilities folder. Once there double click Terminal.app.
Go to the directory (or folder) that you would like to create your hidden folder in. You can do this by typing
cd yourDirectory (e.g. cd Desktop)The Sage suggests using the Desktop since the folder is hidden
Once in the desired location create you hidden folder by typing
mkdir .yourFolder (e.g. mkdir .Folder)mkdir means make directory. The . before the folder name means that it will be hidden.
Then all that is left is put things in your hidden folder. There are several ways to open the folder via the finder. In the finder press ⌘-shift-G (or go -> go to folder) and then type the folder name with the associated path.
~/yourDirectory (e.g. ~/Desktop/.Folder)In the the terminal type:
open yourDirectory (e.g. open ~/Desktop/.Folder)- Once you open the folder via the finder you can place anything that you would like within that folder by dragging and dropping (remember that dragging while holding the ⌥(option) key will copy the file to the location).
Of course you could move or copy contents to the folder using the command line by using the following commands respectively.
mv TextFile.txt ~/Desktop/.Folder
cp TextFile.txt ~/Desktop/.Folder
To remove the the folder all you need to do is use the rm (remove) command.
rm -r .Folder
Be careful with this. You cannot undo this one.
A few other basic commands that you may find helpful (and are in the podcast) are:
ls
ls -a
The first commands list the contents of the Directory that you are in while the second command lists every file (including the invisible ones) in the directory.
This has been rather long winded. Lets summarize. To make a hidden folder called Hidden on the desktop type the following into the terminal:
mkdir ~/Desktop/.Hidden
Please send your feedback to info@heysage.com



