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)
.and\.– Barry Carter Aug 01 '22 at 17:04findfrom GNU findutils 4.8.0, the commandfind . -type f -name '*.*.*' |sortfound all the 6 files. Is Windows world in any way connected to your case? (WSL, NTFS, …). – Kamil Maciorowski Aug 01 '22 at 17:14find . -type f -name '*\.*\.*' |sortshows./a..txt./codec-pack-2.6.1.0_en.txt./d...txt./..f.txt – joseph22 Aug 01 '22 at 17:43find --versionisfind (GNU findutils) 4.7.0– joseph22 Aug 01 '22 at 17:44find . -name '*.*.*'also miss 2 files? – Kamil Maciorowski Aug 01 '22 at 17:57find .shows 7 files :../a..txt./b.txt./codec-pack-2.6.1.0_en.txt./d...txt./e./..f.txtnote the filee....is truncated to./e– joseph22 Aug 01 '22 at 18:05find . -name '*.*.*'shows 4 of 6 files, 2 files missing../a..txt./codec-pack-2.6.1.0_en.txt./d...txt./..f.txt – joseph22 Aug 01 '22 at 18:06find . | od -c? Please do not post this in a comment. [Edit] the question and post there. – Kamil Maciorowski Aug 01 '22 at 18:09findobviously "thinks" there are filesb.txtande. Why do you think there areb.txt.ande....? What exact command told you these names? Or with what exact command did you create files with these alleged names? – Kamil Maciorowski Aug 01 '22 at 18:18touch G...is visible in GUI as 4 characters, said differently files that end with a dot. GUI = Graphical User Interface. butfind .sees file as 1 character./Gnot 4 characters. – joseph22 Aug 01 '22 at 18:43pwddir/home/u3/Music/xxand this dir should be ext4. Andfind . -type f -name '*.*.*'shows 4 of 6 files. – joseph22 Aug 01 '22 at 19:32find . -type f -name '*.*.*'shows 4 of 6 files" – So maybe the other 2 were copied without trailing dots in their names. Have you checked this thoroughly in the new location? – Kamil Maciorowski Aug 02 '22 at 04:30find . -type f -name '*.*.*'shows 4 of 6 files.The other 2 files have less than 2 dots & that means
b.txt&e_ On another note I did Live USB Kubuntu 22.04.1 andfind . -type f -name '*.*.*'works, suspect bug in Ubuntu 20.04.4 regarding List files with 2 Periods (dots), or more – joseph22 Aug 03 '22 at 02:09