Showing posts with label UNIX command. Show all posts
Showing posts with label UNIX command. Show all posts

Tuesday, September 3, 2013

UNIX - Command to count the number of times a string appears in a file




grep -c "input_string" filename

UNIX - Creating read-only file in UNIX



1. Create file using touch file_name.


2. Giving Read-only permission to the file by 

chmod 400 file_name.