19 lines
379 B
Markdown
19 lines
379 B
Markdown
+++
|
|
date = "2017-02-05"
|
|
tags = ["linux"]
|
|
title = "Linuxでメモリ解放をユーザー権限で行う方法"
|
|
slug = "linux"
|
|
+++
|
|
|
|
`/etc/sudoers`に以下の文を追加してShellに`alias p="sync && echo 3 | sudo tee /proc/sys/vm/drop_caches"`を追加。
|
|
|
|
```
|
|
%wheel ALL=(ALL) NOPASSWD: /usr/bin/tee /proc/sys/vm/drop_caches
|
|
```
|
|
|
|
```
|
|
$ p
|
|
$ cat /proc/sys/vm/drop_caches
|
|
```
|
|
|