Command lines

To delete tons of files under a dictionary

find . -name "*.png" -print | xargs rm

Enable vi syntax highlighting by default

vi ~/.vimrc
syntax on

Enable psql command on Mac OS X terminal

1. Run

locate psql | grep /bin

in terminal. (e.g. /Library/PostgreSQL/9.4/bin/psql)
2.

vi ~/.bash_profile

3. insert

export PATH=/Library/PostgreSQL/9.4/bin/:$PATH

Enable NTFS r/w support on Mac OS X terminal

 

sudo vi /etc/fstab

insert

LABEL=DRIVE_NAME none ntfs rw,auto,nobrowse

OR

sudo echo "LABEL=DRIVE_NAME none ntfs rw,auto,nobrowse" >> /etc/fstab

Within Finder’s menubar, click Go and then Go to Folder. Type /volumes as the path and press Enter. You can drag your NTFS drive to the sidebar underneath the Favorites tab in the sidebar for easy access.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s