You worst moment on a Unix system - Psychology, Philosophy, and Licenses

Users browsing this thread: 1 Guest(s)
Dworin
Members
(24-11-2020, 12:36 PM)venam Wrote:
(24-11-2020, 12:21 PM)s0kx Wrote: Earlier today I managed to accidentally create a file name * in a directory with other files. I almost ran

If you want to talk about almost worst moment, a similar story keeps happening to me.

I usually take a lot of screenshots in my home directory using scrot, so the screenshots all start with the current date and then the time and resolution.
So normally what I do to remove them all is that I type:
PHP Code:
rm 2020-<tab>* 

Well, sometimes I type that and there's a single file in the directory that starts with "2020-", so the shell add a space after the name and I'm left with:
PHP Code:
rm 2020-11-24-173440_1366x768_scrot.png 

Fortunately, I've never executed it... so far at least.

My screenshots go to /tmp so I can let the regular cleanup deal with it.
If the shell were to place a \<space> after the filename, it wouldn't match anymore (because of the space). Another alternative might be to just type 2020*, without <tab>-expansion.


Messages In This Thread
You worst moment on a Unix system - by venam - 23-05-2016, 01:40 AM
RE: You worst moment on a Unix system - by jkl - 23-05-2016, 11:00 AM
RE: You worst moment on a Unix system - by cjm - 23-05-2016, 11:26 AM
RE: You worst moment on a Unix system - by z3bra - 23-05-2016, 12:19 PM
RE: You worst moment on a Unix system - by rocx - 23-05-2016, 12:32 PM
RE: You worst moment on a Unix system - by xero - 23-05-2016, 03:46 PM
RE: You worst moment on a Unix system - by Dworin - 24-05-2016, 01:44 AM
RE: You worst moment on a Unix system - by z3bra - 24-05-2016, 03:37 AM
RE: You worst moment on a Unix system - by pkal - 13-11-2020, 03:24 PM
RE: You worst moment on a Unix system - by movq - 13-11-2020, 05:31 PM
RE: You worst moment on a Unix system - by pkal - 13-11-2020, 05:43 PM
RE: You worst moment on a Unix system - by s0kx - 24-11-2020, 12:21 PM
RE: You worst moment on a Unix system - by venam - 24-11-2020, 12:36 PM
RE: You worst moment on a Unix system - by freem - 24-11-2020, 01:43 PM
RE: You worst moment on a Unix system - by venam - 24-11-2020, 01:57 PM
RE: You worst moment on a Unix system - by freem - 24-11-2020, 05:07 PM
RE: You worst moment on a Unix system - by jkl - 24-11-2020, 05:13 PM
RE: You worst moment on a Unix system - by Dworin - 24-11-2020, 10:35 PM
RE: You worst moment on a Unix system - by pfr - 25-11-2020, 02:51 AM