Saturday, June 4, 2022

Check for read only file system in Linux server!

 Hi,


We can check for read only file system in Linux in various ways.

//We can't create a file using touch file in that directory.

//We can't perform any execute operation in that directory or mountpoint.

Use following commands to check for read only mount point.

#mount

//It gives the status of every mount point, so that we can check manually.

// we can use script for touch command for every file system to check for read-only mode.

//create a sh file and run below script and get the result.

//

#!/bin/ksh

df | awk '{print $1}'> /tmp/mountpoint;

for i in $( cat /tmp/mountpoint );

do

cd $i;

pwd;

touch newfile6422;

done

//

Thanks


  

No comments:

Post a Comment

Unleashing the Power of Docker and Docker Compose: Building Lightweight and Secure Containers

  Introduction In today's cloud-native world, containerization is the cornerstone of modern software development. Docker has revolutioni...