0

I am trying to find solution to the linux command.

I have a folder and that is mounted to a nfs share.

folder name is /root/user1 (lets say)

if i do $ df /root/users1 Filesystem 1K-blocks Used Available Use% Mounted on server-1:/root/master_folder 22222 456324 3167 2% /root/users1

From this command i am only interested in nfs server name , nfs location which in this case is , server-1:/root/master_folder

How can i achieve this in bash scripts ? Any pointers appreciated.

user839917
  • 851
  • 5
  • 13
  • 20

1 Answers1

0

try

df /root/user1 | sed '1d' - | cut -d" " -f1

Lee
  • 10,496
  • 4
  • 37
  • 45