Running: Ubuntu 20.04 linux with bash
Some how I've managed to get a directory written with the name
`--head--'. Haven't been able to figure out how this got written.
It appears amongst a short list of other directories that are the
names of zfs snapshots.
The `--head--' critter is a directory with files and subdiretories in it. Or at
least that is how emacs sees it.
I want to see it with a simple `ls' or `ls -l' command. A few of what
I've tried:
are:
ls
'--head--'
\-\-head\-\-
[\-][\-]head[\-][\-]
That has drained my obviously less than skillful guesses.
showing the naming mistake in place:
cd /rhosts/.zfs/snapshot
ls -l
drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_daily drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_monthly drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_weekly drwxrwxrwx 1 root root 0 Apr 15 17:34 --head--
Can anyone offer something that actually works?
On 16.04.2022 00:17, hput wrote:
Running: Ubuntu 20.04 linux with bash
Some how I've managed to get a directory written with the name
`--head--'. Haven't been able to figure out how this got written.
It appears amongst a short list of other directories that are the
names of zfs snapshots.
The `--head--' critter is a directory with files and subdiretories in it. Or at
least that is how emacs sees it.
I want to see it with a simple `ls' or `ls -l' command. A few of what
I've tried:
are:
ls
'--head--'
\-\-head\-\-
[\-][\-]head[\-][\-]
That has drained my obviously less than skillful guesses.
showing the naming mistake in place:
cd /rhosts/.zfs/snapshot
ls -l
drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_daily
drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_monthly >> drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_weekly
drwxrwxrwx 1 root root 0 Apr 15 17:34 --head--
Can anyone offer something that actually works?
It's nothing to do with escaping. The tools called with such arguments considers it an option. To prevent that use the end-of-option marker as
in
ls -- --head--
rmdir -- --head--
Running: Ubuntu 20.04 linux with bash
Some how I've managed to get a directory written with the name
`--head--'. Haven't been able to figure out how this got written.
It appears amongst a short list of other directories that are the
names of zfs snapshots.
The `--head--' critter is a directory with files and subdiretories in it. Or at
least that is how emacs sees it.
I want to see it with a simple `ls' or `ls -l' command. A few of what
I've tried:
are:
ls
'--head--'
\-\-head\-\-
[\-][\-]head[\-][\-]
That has drained my obviously less than skillful guesses.
showing the naming mistake in place:
cd /rhosts/.zfs/snapshot
ls -l
drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_daily drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_monthly drwxrwxrwx 1 root root 0 Apr 15 17:34 autosnap_2022-04-14_15:55:20_weekly drwxrwxrwx 1 root root 0 Apr 15 17:34 --head--
Can anyone offer something that actually works?
I want to see it with a simple `ls' or `ls -l' command. A few of what
I've tried:
Running: Ubuntu 20.04 linux with bash
Some how I've managed to get a directory written with the name
`--head--'. Haven't been able to figure out how this got written.
I want to see it with a simple `ls' or `ls -l' command. A few of
what I've tried:
are:
ls
'--head--'
\-\-head\-\-
[\-][\-]head[\-][\-]
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 498 |
Nodes: | 16 (2 / 14) |
Uptime: | 49:30:57 |
Calls: | 9,808 |
Calls today: | 10 |
Files: | 13,754 |
Messages: | 6,190,259 |