Hello Friends I am Deepak Saini And today I am trying to expalin the uses of the swap file in the red hat linux
So lets start
Swap File :- when we are required temporary swap partion then we are create the swap file we are not create the swap partion on our system.
How create the swap file on Linux
Setups
1 We are creating the dump file fr swap partion .
syntax:- dd if=/dev/zero of=/<filename> bs-1M count=1024
In this dd for dump file,file name is the swap file name
the total size of swap file is
ds * count
means ds =1M (m for mb )
count = 1024
the total size of swap file in my case is 1024mb
2 For check the size of swap file
syntax:- du -h <path of swap file>
3 make the swap file
syntax:- mkswap <path of swap file>
4 we are swap on
syntax :- swapon <path of swap file>
5 for checking the swap file is working or not
syntax :- cat /proc/swpas
How to remove the swap file
1 trun of the swap
syntax:- swap off <path of swap file>
2 Remove the swap file
rm -f <path of swap file>
So lets start
Swap File :- when we are required temporary swap partion then we are create the swap file we are not create the swap partion on our system.
How create the swap file on Linux
Setups
1 We are creating the dump file fr swap partion .
syntax:- dd if=/dev/zero of=/<filename> bs-1M count=1024
In this dd for dump file,file name is the swap file name
the total size of swap file is
ds * count
means ds =1M (m for mb )
count = 1024
the total size of swap file in my case is 1024mb
2 For check the size of swap file
syntax:- du -h <path of swap file>
3 make the swap file
syntax:- mkswap <path of swap file>
4 we are swap on
syntax :- swapon <path of swap file>
5 for checking the swap file is working or not
syntax :- cat /proc/swpas
How to remove the swap file
1 trun of the swap
syntax:- swap off <path of swap file>
2 Remove the swap file
rm -f <path of swap file>
0 comments:
Post a Comment