The command to list hidden files or folders in a folder on a terminal is:
CD folder path
Press enter and enter:
Ls-
To force the Mac OS X system to display all hidden files or folders, use the following command on the terminal:
The first command: Defaults write com. Apple. Finder appleshowallfiles true
Press enter to force the system to change the value of appleshowallfiles in the com. Apple. Finder. plist file in the preferences folder to true.
Second command: killall Finder
Press enter to force the Finder to refresh the content of the finder.
If you do not use the command, you can also use the system installation disk to install xcode tools first, and then find COM. apple. finder. plist: double-click the file. The system will open the file with the property list editor in xcode tools, find appleshowallfiles, and change the value to true. If the file does not contain appleshowallfiles, you can add them under root. After modification, you can find force Restart From the Apple menu on the toolbar at the top of the screen, select finder, and click the restart key.
If you want the system to hide the hidden files again, change the appleshowallfiles parameter value to false and restart the finder.
Http://marblesmacnotes.com/blog/2007/10/02/135/#more-135