cc_staff
82
edits
No edit summary |
(use example that has results if tested, copyedits) |
||
Line 13: | Line 13: | ||
<!--T:4--> | <!--T:4--> | ||
To find manual pages pertaining to a certain subject or keyword (for example " | To find manual pages pertaining to a certain subject or keyword (for example "directory"), please enter: | ||
{{Command|apropos | {{Command|apropos directory}} | ||
By convention, the executables themselves contain some help on how to use them. | By convention, the executables themselves contain some help on how to use them. | ||
Line 115: | Line 115: | ||
* Make the file <tt>script.sh</tt> executable: {{Command|chmod a+x script.sh}} | * Make the file <tt>script.sh</tt> executable: {{Command|chmod a+x script.sh}} | ||
* Allow group members to read and write in the directory <tt>shared</tt>: {{Command|chmod g+rwx shared}} | * Allow group members to read and write in the directory <tt>shared</tt>: {{Command|chmod g+rwx shared}} | ||
* Prevent other users | * Prevent other users from reading or modifying your home directory: {{Command|chmod go-rw ~}} | ||
== Viewing and editing files == <!--T:23--> | == Viewing and editing files == <!--T:23--> | ||
Line 131: | Line 131: | ||
=== Searching within a file === <!--T:25--> | === Searching within a file === <!--T:25--> | ||
The <tt>grep</tt> command allows you to look for a given expression in one | The <tt>grep</tt> command allows you to look for a given expression in one file: | ||
{{Command|grep 'tata' file1}} | {{Command|grep 'tata' file1}} | ||
or multiple files | ... or in multiple files: | ||
{{Command|grep 'tata' fil*}} | {{Command|grep 'tata' fil*}} | ||
Note that, in Linux, the "<tt>*</tt>" wildcard matches zero or more characters. The "<tt>?</tt>" wilcard matches exactly one character. | Note that, in Linux, the "<tt>*</tt>" wildcard matches zero or more characters. The "<tt>?</tt>" wilcard matches exactly one character. | ||
Line 143: | Line 143: | ||
{{Command|grep 'number [1-2][0-9]' file | {{Command|grep 'number [1-2][0-9]' file | ||
}} | }} | ||
A regular expression must be used for the search text. To learn more | A regular expression must be used for the search text. To learn more, [http://www.cyberciti.biz/faq/grep-regular-expressions/ see this guide to regular expressions]. | ||
[http://www.cyberciti.biz/faq/grep-regular-expressions/ | |||
</translate> | </translate> |