Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Bash snippet - Shorter remount command.
SUBMITTED BY:
DanielK
DATE:
Aug. 13, 2016, 3:06 p.m.
FORMAT:
Bash
SIZE:
430 Bytes
Raw
Download
Tweet
HITS:
862
Go to comments
Report
# ARGS: <mount point> <remount options>
# eg.
# rmnt /mnt/hdd1 rw,noatime
#
# You don't have to go to the root of the mountpoint, just use:
#
# rmnt . rw
#
# anywhere in the mountpoint tree
function
rmnt
()
{
local
mntp
if
[
$#
-gt
1
]
;
then
mount
$(
df
"
${
1
}
"
--output
=
target
|
{
read
;
read
-r
mntp
;
echo
"
${
mntp
}
"
;
}
)
-o
remount,
$2
else
echo
"
${
FUNCNAME
}
<mount point> <remount options>"
fi
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus