- Web Server
- Control Panels
- Site Map/RSS Feeds
With the grep command.
If you want to find out if the term user is in /etc/httpd/conf/httpd.conf, you would run
grep -i user /etc/httpd/conf/httpd.conf
(-i makes the search case-insensitive).
Normally grep does not tell you the line number where it finds the term. If you want to find out the line number, run
grep -n -i user /etc/httpd/conf/httpd.conf
You can find out about logged in users either by running
server:~# who root pts/0 Nov 12 11:28 (192.168.0.202)
which gives more detailed output:
server:~# w 11:29:49 up 2:19, 1 user, load average: 0.02, 0.01, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 192.168.0.202 11:28 0.00s 0.08s 0.01s w
To edit files on the command line, you can use an editor such as vi. To open the file, run
Now you see the contents of the file (if there is any. Please note that the file is created if it does not exist yet.).
The most important commands in vi are these:
Press i to enter the Insert mode. Now you can type in your text.
To leave the Insert mode press ESC.
"Facebook" is a registered trademark of Facebook, Inc. All rights reserved.