Linux
Installing sub version on linux server
The below example shows simple configuration of svn server on linux server, most of the server has same kind of configuration or setup
Login as root and install required svn modules
# su
# yum install mod_dav_svn subversion
Apache Modules tobe enabled for SVN
LoadModule dav_svn_module modules/mod_dav_svn.so
..
Unable to remove files list too long
When I was trying to find and remove particular files from a directory, I was unable to remove those files from directory and I received the error as /usr/bin/find argument list too long. I executed the below command.
# find ./ -name '*.log' -mtime +10 -exec rm {} \;
This error ..
Linux command to find hardware firmware version
How to find out the firmware version in linux?
Linux has given you various option to find out the firmware version. Linux is an wonderful operating system and many peoples love who are using it in their daily life. The firmware version can be easily checked out in Linux by using ..
Lsof command examples
lsof is a cool command to find all the open file list, the same command is also used to find the deleted files which is a major reason of overflowing of disk space. But actually the diskspace in not full.
The below examples of lsof command will give you a brief ..
Linux clear Virtal memory
How to clear virtual memory in linux?
Before clearing or free cache memory, execute the sync command in order to make sure all cached objects are freed.
# sync
To free pagecache
# echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
# echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes
..
Script store output as same user not as root
# grep 'Defaults env_keep += "HOME"' /etc/sudoers
Defaults env_keep += "HOME"
Add the below lines in /etc/sudoers
Defaults always_set_home
Defaults:username !requiretty,!always_set_home
Script to modify sudoers file:
# sed -i 's/Defaults:username !requiretty/Defaults: username
!requiretty,!always_set_home/' /etc/sudoers
..
Basic info before registering a domain name
Domain Name:
A Domain Name is a unique name that you choose for your web site. All websites are identified only by their names called as domain names (e.g: google.com, w3calculator.com).
The domain names have to be registered for having the ownership for that name. Domain name and ip addresses of web ..
Clear apache log file
The below script will help you to find and remove apache log
ls -t apache2/error.log* | while read f; do ls -lh $f; n=$(echo $f | cut -d . -f3);
echo $n; if test "$n" -gt 20 ; then echo "y : rm $f"; rm -rf $f; fi ;done
# ..
Find error in log file based on time
The below command is used to find the number of access details or number of request based on time.
# cat access.log | cut -d ':' -f1,2 | uniq -c
Output:
1 Mar 5 10:23
1 Mar ..
Change file name from png to jpg
The below script will help you to convert all the specified png files to jpg files. This is a simple single line script, which helps you to rename jpg files to png files or as the files you wish.
# for img in *.png; do convert ..
Generate device report
How to prepare the survey report in Linux server?
How to prepare the Test report in linux server?
How to generate device report in linux server?
Below are the steps followed to create the Survey report and Test report of a server. This steps will help you to generate the test report for ..
Example create x number of test files
At time for testing purpose or when we do a study test we might require to create some thousands of files, abut actually we might not have such a testing environment. In linux machine you can achieve this by executing the below simple commands. For this kind of testing or ..
List files comsuming more space
Normally we list the files by using ls command, but most of the time we use du command to find the file size of a file. The ls command can also be used to find the file size. The below is a simple example to list the file size of ..
Program not registered storage backup
While running the backup on offline storage you might get the error like this sometimes, In order to resolve the error you can follow the below steps.
Follow the below steps to resolve the error RPC warning: RPC cannot make a procedure call: Create failed: Program not registered
1) Verify that the ..
Find the WWN's of LINUX server
What is the command to find the WWN in linux?
How to find fibre channel is present in Linux machine or not?
How to find and external storage device is added to linux server?
In storage normally a user need to find the WWN or world wide number of a fibre channel, before ..