1
0
hugo/content/blog/2017-02-05-linux.md

19 lines
379 B
Markdown
Raw Normal View History

2024-04-23 13:21:26 +00:00
+++
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
```