# AI Önemli Dosyaları Sildi, rm Komutu trash Oldu

[r/ClaudeAI](https://reddit.com/r/ClaudeAI/comments/1nrrmv3/til_ai_keeps_using_rm_rf_on_important_files/) • [r/ClaudeCode](https://reddit.com/r/ClaudeCode/comments/1nrrn4z/til_ai_keeps_using_rm_rf_on_important_files/)

AI ile pair programming yapıyordum. Config dosyalarımı iki kez sildi.

İlk düşünce: Onay istemleri ekle Gerçek: Okumadan yes'e basmaya devam ettim

İkinci düşünce: İzinleri kısıtla Gerçek: Günlük iş için çok sinir bozucu

Son karar: `alias rm='trash'`

Şimdi AI gün boyu rm -rf yapabilir. Dosyalar çöpe gidiyor, yok olmuyor.

macOS için komut:

```bash
alias rm='trash'
```

Kalıcı yapmak için \~/.zshrc'ye ekle.

***

edit: İşte başka bir alternatif

```bash
rm() {
    echo "WARNING: rm → trash (daha güvenli alternatif)" >&2
    trash "$@"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yemreak.com/claude-code/ai-onemli-dosyalari-sildi-rm-komutu-trash-oldu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
