These tips can be used in OSX 10.9
1. Open the finder window at current terminal location.
open .2. Open a terminal at a finder window
you have to create your own shortcut for this. follow below steps to do that- Go to System Preferences -> Keyboard -> Shortcuts -> Services
- Tick the checkbox at New Terminal at Folder
- Click the none text(light grey) in right side of New Terminal at Folder checkbox
- Press your own shortcut key combination
- Right click on a finder window -> Services -> New Terminal at Folder
and one thing I noticed is until you restart the machine, It takes some time to open the terminal after you press the shortcut keys.
3. Create new empty text file using terminal
touch <textfile_name>.txt
4. Open a text file using terminal, Write something to it and Exit from it
vi <textfile_name>
- if you want to write something on file, press i
- if you write nothing on file and wants to exit, press q
- if you write something on file and wants to save it and quit, press wq
- if you write something on file and wants to quit without saving it, press q!
5. Search inside files using grep command
grep "text to search" -R .
Here R option used to search recursively. dot(.) is used to say that search from current folder
6. View hidden files using terminal
ls -al
a is used to say show all files l parameter is used to say long list(descriptive manner) the files
I referred below articles to write this.
Good job. keep it up bro
ReplyDeleteGood job machan...!
ReplyDelete