- Launch Terminal, found in /Applications/Utilities/ or launched through Spotlight,
- Type the following command at the prompt:
sudo nano /private/etc/hosts - Enter the administrator password when requested,
- Once the hosts file is loaded within nano, use the arrow keys to navigate to the bottom of the hosts file to make your modifications,
- When finished, hit Control+O followed by ENTER/RETURN to save changes to /private/etc/hosts, then hit Control+X to exit out of nano,
- Quit out of Terminal when finished.
Showing posts with label Mac OS. Show all posts
Showing posts with label Mac OS. Show all posts
Editing the Hosts File in Mac OS X
Delete All .DS_Store files in directory
.DS_Store (Desktop Services Store) is a proprietary format hidden file created by Apple Inc.'s Mac OS X operating system to store custom attributes of a folder such as the position of icons or the choice of a background image. (wiki)
To remove all DS_Store files in a specific directory:
- Select Applications > Utilities to launch Terminal.
- Enter the following UNIX command:
sudo find <directory path> -name ".DS_Store" -depth -exec rm {} \;
- When prompted for a password enter your Mac OS X Administrator password.
If You can't empty the Trash
- First, try holding the Option key as you choose Empty Trash from the Finder's File menu.
if this is not worked for you, open terminal and write
- sudo rm -rf <file path>
if you don't know full file path, just write sudo rm -rf and don't press Enter yet, drag item from trash to terminal and this will automatically adds file path.
Show / Hide Hidden Files on Mac OS X
- To show hidden files, open terminal window and write 2 line below:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
- If you want them invisible again, chane TRUE flag to FALSE and killall finder
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
Subscribe to:
Posts (Atom)