Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit a file from the command line Mac OS X?

How to open and edit the file in the command line? I tried to use the command open:

sudo open -e /etc/apache2/extra/httpd-vhosts.conf

but the file is Locked and I can not change anything.

enter image description here

I need to edit a lot of text and use nano or vim is not very convenient.

like image 808
Ihor Tkachuk Avatar asked Jan 22 '15 19:01

Ihor Tkachuk


1 Answers

sudo open -a TextEdit /etc/apache2/extra/httpd-vhosts.conf
like image 192
Sinisa Drpa Avatar answered Sep 18 '22 13:09

Sinisa Drpa