strange recursive directory named "-i" in my filesystem

If none of the more specific forums is the right place to ask

strange recursive directory named "-i" in my filesystem

Postby procyon108 » 2020-11-28 16:11

Mysteriously I found, in my home directory, the character "-i"

I can't remove it. But it is a directory and when I list its contents, I see this:
Code: Select all
178652250  audiobooks.jpg
178652242  audiobooks.png
178651238  bin
179700884  client-configs
179700951  Deez
179701086  Deezloader
179701087 'Deezloader Music'
179700929  Desktop
179700933  Documents
179700930  Downloads
179700897  easy-rsa
178652253  EasyRSA-unix-v3.0.6.tgz
178652259  EasyRSA-unix-v3.0.6.tgz.1
179700851  EasyRSA-v3.0.6
178652239  elearning.png
178652213  FileBot_License.psm
179700908  files
179701000  git
178652285  -i
178652255  kyzer.ovpn
178652270  kyzer.req
178652224  latest.tar.gz
179699722  music
179700934  Music
179700902  openvpn-ca
178652256  openvpn-install.sh
179700935  Pictures
179700932  Public
178651247  python
178652223  scripts
178652261  smb.conf
178652258  smb.conf.default
179700942  sparrow
178651149  static.key
178717802  swag
179700931  Templates
178652269  test.ovpn
179702600  tidal
178652287  tidal-new
178652199  usersettings.json
179700936  Videos
178652272  wg0-client-kyzer.conf
178652252  wireguard-install.sh
178652277  wp.sql


these are all directories on my system, prefixed my numbers. note the strange "-i" is recursively included in it.

Can someone help me figure out what is happening here? I am on Debian 10.
procyon108
 
Posts: 9
Joined: 2016-01-31 08:28

Re: strange recursive directory named "-i" in my filesystem

Postby Head_on_a_Stick » 2020-11-28 16:13

procyon108 wrote:I can't remove it

Why not?

Have you tried
Code: Select all
rm -r -- -i
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13062
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: strange recursive directory named "-i" in my filesystem

Postby arzgi » 2020-11-28 16:34

HOAS again gave the perfect solution.

I like to add that mc file manager (package mc) can also used to remove oddly named files or directories.
arzgi
 
Posts: 701
Joined: 2008-02-21 17:03
Location: Finland

Re: strange recursive directory named "-i" in my filesystem

Postby Head_on_a_Stick » 2020-11-28 16:49

ranger can also delete such files & directories.

Alternative approach (run the command from the directory containing the unwanted file or directory):
Code: Select all
rm -r ./-i

Both of these options are covered in the man page for the rm command.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13062
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: strange recursive directory named "-i" in my filesystem

Postby arzgi » 2020-11-28 18:20

Head_on_a_Stick wrote:Both of these options are covered in the man page for the rm command.

Sometimes I've wondered if I'm the only still reading man pages, now there are at least two :mrgreen:
arzgi
 
Posts: 701
Joined: 2008-02-21 17:03
Location: Finland

Re: strange recursive directory named "-i" in my filesystem

Postby p.H » 2020-11-28 22:27

Real directories cannot be recursive and create loops, so it must be a symbolic link created with ln -s.
p.H
 
Posts: 1620
Joined: 2017-09-17 07:12


Return to General Questions

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable