Vous êtes sur la page 1sur 2

How to create symbolic link in unix or linux?

To create a symbolic link in Unix or Linux, at the shell prompt, enter the following command: surya# ln -s {target-filename} {symbolic-filename} For example create softlink for /webroot/home/httpd/test.com/index.php as /home/surya/index.php, enter the following command: #ln -s /webroot/home/httpd/test.com/index.php /home/surya/index.php

How to check symbolic link is created or not?

#ls -l lrwxrwxrwx 1 surya surya 16 2012-09-24 16:53 index.php -> /webroot/home/httpd/test.com/index.php

How to find Software Raid levels using command in linux? or How to check The RAID level in linux?
How to find Software Raid levels using command prompt in linux? or How to check The RAID level in linux?

surya # cat /proc/mdstat Personalities : [raid0] md0 : active raid0 sda8[0] sdb8[1] 655355328 blocks 64k chunks

By using this command we can see Which RAID is configured on the Machine. But remember that this command wont work , If you are configuring Hard Ware RAID levels.

How to view system log messages in unix?


Q. where are the log files are located under redhat or Debian or Cento OS Linux server? How do I open or view log files?

Almost all log files are located under /var/log directory (and subdirectory). You can change to this directory using cd command. You can use less, more, cat or tail command to see the logs. To Go to /var/logs directory: # cd /var/log/ # ls To View common log file /var/log/messages using any one of the following command:

# tail -f /var/log/messages, used in real time, it will show last 10 logs # less /var/log/messages # more /var/log/messages, we can see page page, press Tab to toggle between pages. # vi /var/log/messages , to see in vi editor

# cat /var/log/messages

Q. what is the use of log messages? logs are used to see the status of your system. which provides the error messages and services return messages with the help of logs we can trouble shoot the system erors Linux Log files and usage /var/log/dmesg --> used for kernel boot messages /var/log/messages --> stores the standard system error messages /var/log/maillog --> mail system messages

/var/log/secure --> security , authentication messages /var/log/audit/audit.log --> kernel auditing messages var/log/debug -->Debugging log messages

/var/log/faillog --> User failed login log file /var/log/kern.log --> Kernel log file /var/log/lpr.log -->Printer log file /var/log/mail.* : All mail server message log files /var/log/mysql.* : MySQL server log file /var/log/user.log : All userlevel logs /var/log/xorg.0.log : X.org log file /var/log/apache2/* : Apache web server log files directory /var/log/lighttpd/* : Lighttpd web server log files directory /var/log/fsck/* : fsck command log /var/log/apport.log : Application crash report

Vous aimerez peut-être aussi