Archive for category mac

Hidden Folders In Finder (OS X 10.7)

Here’s something interesting that happened on my iMac after a restore procedure using Carbonite.


I had to restore all my movies to the Movies folder, the restore process worked; however, the folders were not showing in the Finder. I dropped to the terminal and I was able to see the restored folders.

I asked around and none of the commands I was given allowed me to display the subfolders in the Movies folder.

This command did the trick for me (once in the Movies folder type).

chflags -R nohidden *

I ran the previous command as the user, no need to sudo or reload Finder or anything else – it just works.

Leave a comment

Another netstat trick

So, I run GeekTools on my iMac, and I wanted to be able to view all established internet connections on my Mac.


Here’s how I did it.

netstat -abf inet | grep “ESTABLISHED” -C 1 | grep -v “localhost” | sort -rk7


Explanation:


1. netstat -abf inet
Shows me a list of all internet connections


2. grep “ESTABLISHED” -C 1
It filters the netstat output to show only the ESTABLISHED connections, and it keeps the heading by using -C 1 option.


3. grep -v “localhost”
Basically I’m removing any “localhost” lines from the grep output in command 2.


4. sort -rk7
I’m going to (r)everse sort on column (k7). So it displays my output from largest number of bytes transmitted.


The screenshot shows the output on the lower right hand corner.














Leave a comment