Aug 13, 2024 13:25
Dragons are big, green, and known to eat people.
 
Oct 12, 2023 15:44
A humble question borne of ignorance: Having grown up in rainy climes, it seems plausible that on a drizzly, fully overcast day, Earth would be brighter from space than from the ground. Does cloud cover change anything?
 
May 17, 2022 22:14
jimsdesk : 15:11:34 /home/jim/test/20220517/new> ls
ééé             ééé?
jimsdesk : 15:13:55 /home/jim/test/20220517/new> find . -name '???'
./ééé
jimsdesk : 15:14:04 /home/jim/test/20220517/new> find . -name '????'
./ééé�
May 17, 2022 22:14
find still gets it right, though:
May 17, 2022 22:13
jimsdesk : 15:10:14 /home/jim/test/20220517/new> touch $'\ue9\ue9\ue9\xe9'
jimsdesk : 15:10:50 /home/jim/test/20220517/new> ls
ééé             ééé?
jimsdesk : 15:10:51 /home/jim/test/20220517/new> zsh
jimsdesk% ls -l
total 1
-rw-------  1 jim  wheel  0 May 17 14:49 ééé
-rw-------  1 jim  wheel  0 May 17 15:10 ééé?
jimsdesk% ls ???
ééé
jimsdesk% ls ????
ééé?
jimsdesk%
jimsdesk : 15:11:13 /home/jim/test/20220517/new> ls ???
ééé
jimsdesk : 15:11:16 /home/jim/test/20220517/new> ls ????
ls: ????: No such file or directory
May 17, 2022 22:12
FreeBSD 13.1. Yes, that case is not as pretty:
May 17, 2022 21:50
jimsdesk% echo $ZSH_VERSION
5.8.1
jimsdesk% locale charmap
UTF-8
jimsdesk% touch $'\ue9\ue9\ue9'
jimsdesk% ls -l
total 1
-rw-------  1 jim  wheel  0 May 17 14:49 ééé
jimsdesk% find . -name '??????'
jimsdesk% find . -name '????'
jimsdesk% find . -name '???'
./ééé
May 17, 2022 21:47
As above, charmap is UTF-8. find ééé -name '???' matches it, find ééé -name '??????' does not. But is it a multi-byte character? Hex E9 is still a single byte.
May 17, 2022 21:47
I'm happy to test, if you can create an example of how to create such.
May 17, 2022 21:47
Thank you for providing an example of the bug in GNU find. FWIW, BSD find appears to handle that particular case correctly (CHARSET=UTF-8), matching on -name ????????* but not -name ?????????* and likewise, matching on -not -name '?????????*' but not on -not -name '????????*'.
 

 /dev/chat

General discussion for unix.stackexchange.com. If you have a q...
Feb 28, 2022 18:10
@terdon Thank you for the feedback.
 
Jun 6, 2020 13:55
Also, chmod alone is necessary but not sufficient. The OP also needs to sudo chown root your_script
 
Jun 6, 2020 13:54
visudo is the command to fix that.
Jun 6, 2020 13:54
You might not understand sudo's purpose. It is specifically for use cases like this, when one wants to allow a non-privileged user to run one specific privileged command, without having to enter credentials via an interactive method like keyboard password entry. Read the man page with man sudoers.