LoginSignup
0

More than 3 years have passed since last update.

drop_cachesまでのパスが覚えられないので/sbinにつっこむ

Posted at

ええと、drop_caches..なんだっけとなるので
スクリプトにしちゃえばいいよね。

/sbin/drop_caches
#!/bin/sh

if [ $# -ne 1 ]; then
        echo "missing 1 required positional argument"
        exit 1
fi

sync
echo $1 > /proc/sys/vm/drop_caches
# chmod +x /sbin/drop_caches

使い方

# drop_caches 3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0