Ordinarily typing cmd > file will overwrite the file if it already exists. I often type >> to append, but get very worried about accidentally typing > and destroying my file. Is there an alternative command which doesn't risk me destroying a file if I mistype? Or alternatively, a way to make > ask for permission before overwriting existing files?
Asked
Active
Viewed 30 times
0
preferred_anon
- 193
- 5
-
[Solution for `bash`](https://superuser.com/a/1410516/432690). – Kamil Maciorowski May 18 '19 at 10:47
-
@Kamil thank you! I use suckless terminal rather than bash, so this doesn't solve my problem completely, but is definitely a useful place to look – preferred_anon May 18 '19 at 11:05
-
1I'm not sure what your point is. Just in case: [*What is the difference between Terminal, Console, Shell, and Command Line?*](https://askubuntu.com/q/506510/693277) – Kamil Maciorowski May 18 '19 at 11:17
-
Got it, I'm an idiot! I thought st was a shell and didn't read from `bashrc`, but I've just looked and I'm wrong. Thank you! – preferred_anon May 18 '19 at 15:21