0

From terminal, how to list files with 2 dots or more then later manually judiciously rename files.

Six (6) file examples:

a..txt
b.txt.
codec-pack-2.6.1.0_en.txt
d...txt
e....
..f.txt

Using: Ubuntu 20.04.4 LTS (Focal Fossa)

Some success with

find . -type f -name '*.*.*' |sort

The above command outputs 4 of 6 files:

./a..txt
./codec-pack-2.6.1.0_en.txt
./d...txt
./..f.txt

and misses 2 files:

b.txt.
e....

The command below did not find above 2 files that end with a dot .:

find . -type f -name '*\.'

How to List files with 2 Periods (dots), or more?

--

More information requested.

$ find . | od -c
0000000   .  \n   .   /   a   .   .   t   x   t  \n   .   /   b   .   t
0000020   x   t  \n   .   /   c   o   d   e   c   -   p   a   c   k   -
0000040   2   .   6   .   1   .   0   _   e   n   .   t   x   t  \n   .
0000060   /   d   .   .   .   t   x   t  \n   .   /   e  \n   .   /   .
0000100   .   f   .   t   x   t  \n   .   /   1   1   _   e   m   p   t
0000120   y   .   t   x   t  \n
0000126

--

More information requested.

  • What is the filesystem?
  • What is the GUI program exactly?
$ lsblk -f
FSTYPE = vfat for a usb flash drive, stick.
gnome-shell --version
GNOME Shell 3.36.9
___________ 3.36.8 by visible GUI in Settings .1 difference
$ apt-cache show gnome-shell | grep Version
Version: 3.36.9-0ubuntu0.20.04.2
Version: 3.36.4-1ubuntu1~20.04.2
Version: 3.36.1-5ubuntu1
$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
phuclv
  • 30,396
  • 15
  • 136
  • 260
joseph22
  • 509

1 Answers1

0

You can try something like:

ls -a *\.*\.*

the -a is to show files starting with . Here is example:

# find .
.
./..f.txt
./a..txt
./b.txt.
./codec-pack-2.6.1.0_en.txt
./d...txt
./e....
# ls -a *\.*\.*
..f.txt                    b.txt.                     d...txt
a..txt                     codec-pack-2.6.1.0_en.txt  e....

Here is example of vertical listing:

# ls -1a *\.*\.*
..f.txt
a..txt
b.txt.
codec-pack-2.6.1.0_en.txt
d...txt
e....
Romeo Ninov
  • 7,848