Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for Quasímodo‭

Type On... Excerpt Status Date
Comment Post #287557 @#36396, I concur but, regarding the flag, it seems that moderators have no way to move this to main Meta.
(more)
2 months ago
Comment Post #288008 Fails if directory is empty, but `shopt -s nullglob` will address that edge case.
(more)
2 months ago
Edit Post #287922 Post edited:
keyboard-rate is too specific of a keyword, suggesting simply keyboard instead.
3 months ago
Comment Post #287922 Xorg: Option "AutoRepeat" "0 0" Console: Maybe Udev rules can help
(more)
3 months ago
Comment Post #287715 @#58087, OK, I edited the answer.
(more)
4 months ago
Edit Post #287715 Post edited:
Recursive
4 months ago
Comment Post #287822 Do you experience some inconvenience with that solution, or are you asking really just for a simpler solution?
(more)
4 months ago
Edit Post #287835 Initial revision 4 months ago
Answer A: Vim bindings not working in terminal python interpretter
Python's interactive interpreter uses GNU Readline, so Bash's line interpreter, not Zle, which is Zsh's. Therefore, when you enter `python`, the cursor either won't change or will change accordingly to what you have in `.inputrc`, which is GNU Readline's initialization file. Likewise for the Vi or...
(more)
4 months ago
Comment Post #287715 Hmm, it's probable that you are right, @#8056. I also found it weird that one would use Find in that case, but after seeing many times weird or downright wrong choice of tools for a given job, one loses a bit of that sense. Let's wait for clarification, if it doesn't come I will rewrite the answer...
(more)
5 months ago
Edit Post #287715 Initial revision 5 months ago
Answer A: Recursively remove files with the same name as the ones that end in `.part`
It is incorrect for two reasons. 1. File names containing glob characters This is an edge case scenario. Consider this structure: ``` . ├── abc ├── abc.part ├── cde └── ce.part ``` The outermost Find will find - `abc.part`, so `base=abc` and the innermost Find looks for files ...
(more)
5 months ago
Comment Post #287557 This request is valid in many, if not all, communities. I believe it should be in [the main Meta](https://meta.codidact.com).
(more)
6 months ago
Comment Post #287563 You say "programmatically manipulate". Does that mean that you would be willing to modify its source code directly, or do you mean writing some external program that would affect the state of the bar?, such as one with Appindicator, as r~~ mentions.
(more)
6 months ago
Edit Post #285654 Post edited:
Ibus must also be killed
6 months ago
Comment Post #287421 Perhaps there is something wrong on my side, but if I try `startx sh -c 'true; exec $HOME/.xinitrc' 2>logfile`, I get some error with _xterm_ and Xorg fails to start: ``` [...cropped...] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc. (II) modeset(G0): Initializing kms color ma...
(more)
7 months ago
Comment Post #287418 I'm afraid you can't do that. See `man startx xinit`. You can create a wrapper that writes a xinitrc before launching startx, though.
(more)
7 months ago
Comment Post #287418 Thanks for taking the time to write an answer! Just a few notes: If you are using a terminal based browser you can't see pictures, neither can screen readers read their content. In particular, this picture is unreadable unless one opens it in a new tab or image viewer. Please edit the post t...
(more)
7 months ago
Comment Post #287370 Yes, I am familiar with Git, and though unfortunately not all of the packages are maintained in version control system (and tagged by version), that's certainly a good solution in many cases. Thanks for the answer!
(more)
7 months ago
Edit Post #287234 Initial revision 8 months ago
Answer A: Preserve the sources extracted by dpkg-source so as to save time
From `man dpkg-source`, -ss Specifies that the original source is available both as a directory and as a tarfile. dpkg-source will use the directory to create the diff, but the tarfile to create the .dsc. This option must be used with care - if the directory and tar...
(more)
8 months ago
Edit Post #287074 Post edited:
8 months ago
Edit Post #282978 Post edited:
Add a kernel tag
8 months ago
Comment Post #286999 It didn't help much :(. But I confirmed via `top` that the hog is caused by source uncompression, `unxz`.
(more)
8 months ago
Edit Post #287074 Post edited:
8 months ago
Edit Post #287103 Post edited:
Add reference for bug closure syntax
8 months ago
Edit Post #287103 Post edited:
Provide example
8 months ago
Edit Post #287103 Initial revision 8 months ago
Question Retrieve changes that closed a Debian bug
If a Debian bug number is referenced in the changelog of an uploaded package, it is automatically closed with a generic message: > We believe that the bug you reported is fixed in the latest version of [package], which is due to be installed in the Debian FTP archive: Random example. This m...
(more)
8 months ago
Edit Post #287074 Initial revision 9 months ago
Answer A: How do I deal with a "pending update to "snap-store" snap, close the app to avoid disruption" notification in Ubuntu 22.04?
If snap-store itself is preventing the update, it's straightforward: snap-store --quit sudo snap refresh snap-store But sometimes it might be something else, in which case the above solution won't work. In which case the general solution is to first run `snap refresh snap-store`. It w...
(more)
9 months ago
Edit Post #287065 Post edited:
Fix copy-paste leftover
9 months ago
Edit Post #287065 Initial revision 9 months ago
Answer A: Set compose key to Shift + AltGr
You can find a list of options in `man xkeyboard-config`. Under the section "key to choose the 3rd level" is the one you are after: lv3:raltswitchmultikey Right Alt; Shift+Right Alt as Compose To enable it, use setxkbmap -option lv3:raltswitchmultikey You should also pass ...
(more)
9 months ago
Edit Post #287064 Initial revision 9 months ago
Question Set compose key to Shift + AltGr
I have upgraded Xubuntu from 20.04 to 22.04 and my compose key, which defaulted to Shift + AltGr, was disabled. It is no longer available in the keyboard settings GUI either. How can I set the compose key to Shift + AltGr again? Adapted from Ask Ubuntu: Upgrading from Xubuntu 20.04 to 22.04 has...
(more)
9 months ago
Comment Post #286999 Thanks @#8049, I hadn't thought about that. I will try it.
(more)
9 months ago
Edit Post #286999 Initial revision 9 months ago
Question Preserve the sources extracted by dpkg-source so as to save time
It takes a long time to build even the source package for a PPA of a huge project, and while the build isn't finished my computer is under heavy load so I can barely navigate a browser. The frustration is doubled when I get an error during that process. Most of the times, errors are caused by a "m...
(more)
9 months ago
Comment Post #286930 Perhaps --auto overrides --dpi? > --auto For connected but disabled outputs, this will enable them using their first preferred mode (or, something close to 96dpi if they
(more)
9 months ago
Comment Post #286725 There is an answer here: https://unix.stackexchange.com/q/595574
(more)
11 months ago
Comment Post #286778 Did you read `man less`?
(more)
11 months ago
Edit Post #286518 Initial revision about 1 year ago
Answer A: Bind brightness/volume and other special Fn keys in a tty
The special Fn keys typically trigger ACPI events, for which the ACPI daemon can trigger actions. Install ACPI daemon (`apt install acpid`) and make sure it is started and enabled. If it isn't, systemctl start acpid systemctl enable acpid You can read its manual page and inspect f...
(more)
about 1 year ago
Edit Post #286517 Initial revision about 1 year ago
Question Bind brightness/volume and other special Fn keys in a tty
I am running Debian stretch on a Lenovo laptop with only a window manager (i.e. no desktop). Out of the box, this configuration of Debian ignores the keys with special Fn functions, such as volume up, mute microphone, brightness up, etc. To solve the problem under X, I bound these special keys u...
(more)
about 1 year ago
Edit Post #286368 Initial revision about 1 year ago
Answer A: Capture separate _and_ combined stdout/stderr
Each file descriptor can only point to a single file. File descriptors can be duplicated such that both point to a single file, but a file descriptor cannot point to two files. Hence, you have to decide whether stdout points to out.txt or to both.txt, and similarly with stderr. Of course, y...
(more)
about 1 year ago
Comment Post #286318 I'm afraid even that is not reliable either. Something like `cmd 2> >(timestamp_err) > >(timestamp_out)` will inevitably cause a race condition since there are still two concurrent processes. It is not impossible that, in practice, the order of magnitude of the "average delay" between input re...
(more)
about 1 year ago
Comment Post #286318 This seems to be hard enough that even Debian's [`annotate-output`](https://packages.debian.org/sid/devscripts) doesn't do it. Contrarily to what you claim, Zsh also fails to preserve the order in `both.txt`, as my tests confirmed. From https://zsh.sourceforge.io/Doc/Release/Redirection.html, "the...
(more)
about 1 year ago
Comment Post #286058 Does it really present a histogram? Not according to [this picture](https://losst.ru/wp-content/uploads/2016/03/Snimok-ekrana-ot-2020-08-18-18-15-08.png) (not mine).
(more)
over 1 year ago
Comment Post #284642 @Canina I meant that making the key a modifier should not change `showkey` output, i.e. the key press and key release events, be it in `--scancodes` or `--keycodes` mode (I don't have `--keymap` available, my --version says "showkey from kbd 2.4.0").
(more)
over 1 year ago
Comment Post #284642 @#53305 You might want to see the edited answer. Unfortunately I could not find a way to determine the PS/2 mode of my keyboard.
(more)
over 1 year ago
Edit Post #284672 Post edited:
Add Wikipedia and IBM documents
over 1 year ago
Comment Post #285962 [Using the yum-cron Interface to Automatically Keep Your System Up To Date](https://docs.oracle.com/en/operating-systems/oracle-linux/7/yum/ol7-yum-cron.html)
(more)
over 1 year ago
Edit Post #285881 Initial revision over 1 year ago
Answer A: Scalable fonts are not loaded into the X server database
Further digging led me to this post on the FreeBSD forum, in which a user says that > The functionality of the freetype module is contained in the libXfont library. And sure enough I managed to get scalable XLFDs by enabling the truetype USE flag for libXfont2 and recompiling it. The effect ...
(more)
over 1 year ago
Edit Post #285867 Post edited:
Replace repeated reference
over 1 year ago
Edit Post #285867 Post edited:
over 1 year ago
Edit Post #285867 Post edited:
over 1 year ago
Edit Post #285867 Initial revision over 1 year ago
Question Scalable fonts are not loaded into the X server database
I have some old X11 applications complain that they cannot find a ISO8859-2 font. So I executed grep -r 8859-2 /usr/share/fonts/ and, to my surprise, found many matches, for example ``` ==> /usr/share/fonts/dejavu/fonts.dir /usr/share/fonts/unifont/fonts.dir <== unifont.ttf -misc-unif...
(more)
over 1 year ago
Comment Post #285831 Please see whether deleting the `*.emerg` line solves your problem, as suggested by https://superuser.com/questions/1092244/how-do-i-stop-tomcat-rsyslog-from-logging-to-console
(more)
over 1 year ago
Comment Post #285831 For your future questions, please use the three backticks marks to introduce and end full code blocks. Single backticks are for inline `code` and doesn't work well for multiple lines. I have also attempted a simplification in the way you display your configuration files. I hope you and readers will ...
(more)
over 1 year ago
Edit Post #285831 Post edited:
Formatting
over 1 year ago
Edit Post #285654 Post edited:
Additional references
over 1 year ago
Edit Post #285654 Initial revision over 1 year ago
Answer A: Disable transient symbols for compose and dead keys in GTK programs
This is originally Ibus' (an input method) behavior. It provides some facilities to extend the basic "input by typing". Examples: - `Ctrl+Shift+U` for hex Unicode input. - `Ctrl+.` for emoji selector. Now, to complicate matters, GTK has its own input method too, which is inspired in Ibus, an...
(more)
over 1 year ago
Edit Post #285653 Initial revision over 1 year ago
Question Disable transient symbols for compose and dead keys in GTK programs
An article in the GTK blog explains the situation very well, but here is my go at it. In my keyboard layout, accents are handled as dead keys, so to insert "ë", first I type `¨` and then `e`. Nothing happens on the screen until the very last step, at which point `ë` is inserted. That, however, ...
(more)
over 1 year ago
Edit Post #285646 Post edited:
Formatting; Use ls -l instead of ll, since the latter is just your user-defined alias
over 1 year ago
Edit Post #285650 Initial revision over 1 year ago
Answer A: What does capital T mean in the output of 'ls -l'?
The reason why you don't find this in `man ls` is that the GNU project (that developed Coreutils) usually provides the complete documentation of its components not in classic manual pages, but in so called Info documents (for more context, see Unix & Linux: What is GNU Info for?), and that is indeed ...
(more)
over 1 year ago
Edit Post #285645 Post edited:
Mostly code block formatting
over 1 year ago
Comment Post #284642 @#53305 I use my laptop's keyboard — but since [I read that touchpads may be USB or PS/2](https://wiki.gentoo.org/wiki/Synaptics#Installation), I reckon a laptop's keyboard might also be so?
(more)
over 1 year ago
Edit Post #284672 Post edited:
over 1 year ago
Comment Post #285301 I think looking at `$0` is a simple and portable way to figure out what shell one is running. Since it may be, for example, `zsh` and `bash`, but also `/bin/bash` (i.e., including the directory component), pattern matching with a `case` statement would be the way to go, resulting in a POSIX compliant...
(more)
over 1 year ago
Edit Post #285278 Post edited:
Add the proper error message; Add link to crosspost; Spelling/Punctuation.
over 1 year ago
Comment Post #285278 Note that Bash also supports the ** construct. Look for `globstar` in the manual. You could then adapt your statements to work in both shells and do away with the if-elif. Unless you really don't want a recursive traversal under `.functions.d` on Bash, only in Zsh (that's what the script is trying to...
(more)
over 1 year ago
Comment Post #285144 @#53003 True. "Unix-like systems" or "(almost) POSIX systems" would be more appropriate.
(more)
over 1 year ago
Comment Post #285187 A retractation: I'm no native speaker and thought the word "cruft" meant something different, not "trash, debris, etc." Luckily I just looked it up on time to apologize and retract it. I had no intention whatsoever to abase those questions nor to demoralize those who asked them.
(more)
over 1 year ago
Comment Post #285187 Yup, I also feel that way towards Windows (well, non-free software in general) and Smartphones, so I would also prefer never to see those questions. However, at the moment we would receive about a question per day if we merged, and at that rate wading through the cruft wouldn't be hard in the slighte...
(more)
over 1 year ago
Edit Post #285164 Initial revision over 1 year ago
Answer A: I deselected a package and changed my mind. How to select it without re-emerging?
From Selected-packages set (Portage) — Adding an atom without recompilation (yes, embarrassingly the very link in the question, the word "atom" put me off...), emerge --noreplace xournalpp ``` --noreplace, -n Skips the packages specified on the command-line that have alread...
(more)
over 1 year ago
Edit Post #285156 Initial revision over 1 year ago
Question I deselected a package and changed my mind. How to select it without re-emerging?
I executed emerge --deselect xournalpp , which means "I don't need the `xournalpp` package anymore", so it can be removed by a future `--depclean` action in case Portage figures `xournalpp` is not a dependency of any other installed package. Hence the aforementioned command does not unin...
(more)
over 1 year ago
Edit Post #285144 Initial revision over 1 year ago
Question Should we merge with Power Users?
To increase the activity of the site (one of the main concerns related to making Codidact grow), I suggested merging Linux Systems with Power Users on Meta. Do you agree or disagree with merging?
(more)
over 1 year ago
Comment Post #284959 Thank you for your kind words. It would be an honour to serve Codidact. I won't be voting on this particular answer so that we can more accurately measure what people think; In case they signal acceptance, I accept the role and hope to live up to the community's expectations.
(more)
over 1 year ago
Comment Post #284956 I found a mention of the error message in https://github.com/rbenv/ruby-build/issues/1353#issuecomment-791727836, perhaps it will be useful.
(more)
over 1 year ago
Edit Post #284821 Initial revision over 1 year ago
Answer A: Quickly increase virtual console ("TTY") font size on the fly
To double the font size: `setfont -d`. To revert to the default font: `setfont`. From the manual page: ``` -d Doubles the size of the font, by replicating all of its pixels vertically and horizontally. This is suitable for high pixel density (e.g. "4k") displays on whic...
(more)
over 1 year ago
Edit Post #284820 Initial revision over 1 year ago
Question Quickly increase virtual console ("TTY") font size on the fly
I just want to "zoom in/out" in the text console, is there a straightforward command to do that? I have found various sources (1, 2, 3) that either suggest permanent changes (e.g. modifying configuration files such as `/etc/default/console-setup`) or complicated procedures such as looking for avai...
(more)
over 1 year ago
Edit Post #284642 Post edited:
over 1 year ago
Edit Post #284672 Initial revision over 1 year ago
Answer A: Why is Pause/Break key is immediately released? Can that be fixed?
From Wikipedia: Break key: > The Pause key is different from all other keys in that it sends no scancodes at all on release in PS/2 modes 1 or 2, so it is impossible to determine whether this key is being held down with older devices. In PS/2 mode 3 or USB HID mode, there is a release scancode, so...
(more)
over 1 year ago
Edit Post #284642 Post edited:
over 1 year ago
Comment Post #284642 @#8049 Since `showkey` only prints scan codes, it shouldn't matter if the key is made a modifier or not. It's interesting that you cannot reproduce it. I tried it on a spare old computer and it was the same behavior.
(more)
over 1 year ago
Edit Post #284642 Initial revision over 1 year ago
Question Why is Pause/Break key is immediately released? Can that be fixed?
Since the Pause key is useless, I tried to map it to a modifier key. What is straightforward for other keys turned out not to work fine for Pause. By inspecting the output of `xev -event keyboard | grep -E '^Key|state'` for holding Pause and then pressing s, ``` KeyPress event, serial 28, synt...
(more)
over 1 year ago
Suggested Edit Post #282978 Suggested edit:
Add a kernel tag
(more)
helpful over 1 year ago
Comment Post #284594 @#8056 Yes, Gentoo's `lesspipe` also looks for `~/.lessfilter`. Very bad taste if you ask me...
(more)
over 1 year ago
Edit Post #284583 Post edited:
Show environment variables; Explain why the issue may not be reproducible for some people.
over 1 year ago
Comment Post #284583 @#8049 Thanks, indeed the problem was a different environment variable: `LESSOPEN=|lesspipe %s`. So either deleting that variable or using `-L` solves the problem. Would you like to write an answer?
(more)
over 1 year ago
Comment Post #284583 @#53503 Please see edit.
(more)
over 1 year ago
Edit Post #284583 Post edited:
The problem is reproducible in a clean environment
over 1 year ago
Edit Post #284583 Initial revision over 1 year ago
Question Make Less use a normal view instead of hexdump view
Less does not display data files normally, but if it were some sort of Xxd. ``` $ bash --norc $ export LESS= $ file -i /var/log/lastlog /var/log/lastlog: application/octet-stream; charset=binary $ less -EX /var/log/lastlog 00000000 a3 4c d2 60 74 74 79 32 00 00 00 00 00 00 00 00 |.L.`tty2...
(more)
over 1 year ago
Edit Post #284389 Post edited:
Cleanup comments in first script; Add POSIX shell alternative.
over 1 year ago
Edit Post #284389 Initial revision over 1 year ago
Answer A: In a bash shell script, how to filter the command line argument list to unique entries only, for processing each?
Bash Here Bash's associative arrays come handy. The idea is to put every argument as a key in a separate array, and then only process arguments that are not keys to that array. ```bash #!/bin/bash declare -A processed #Declare that "processed" is an associative array for e in "$@"; do #...
(more)
over 1 year ago
Comment Post #284250 Point 2 is moot: You can put the Sed script in a file and then the shell doesn't get in your way, all quotes are literal. Can you clarify point 1? Sed does allow multi-line scripts and can even do multi-line operations.
(more)
over 1 year ago
Edit Post #284251 Initial revision over 1 year ago
Answer A: How to figure out the licenses of files installed from packages?
The Debian Administrator's Handbook: The Inner Workings of the Debian Project: > Documentation for each package is stored in /usr/share/doc/package/. (...) The copyright file includes information about the authors and the license covering the software.
(more)
over 1 year ago
Comment Post #283816 @#8049 That is great! I never bothered to find out how to get rid of the latency. Also that led me to find an Arch Linux article with some alternatives (answer edited with that).
(more)
almost 2 years ago
Edit Post #283816 Post edited:
almost 2 years ago
Edit Post #283816 Initial revision almost 2 years ago
Answer A: With a V4L2-compatible webcam, how to see its video feed for the purpose of adjusting aiming?
I routinely use MPV for that. mpv --profile=low-latency --untimed av://v4l2:/dev/video0 You may need to try other devices, as listed by `ls /dev/video`. Thanks to Canina for suggesting the two --options, necessary to avoid latency. I also found Arch Linux: Webcam setup: Applications,...
(more)
almost 2 years ago
Comment Post #283657 Are the dollar signs part of the copied selection? If not, does it not work if you paste it right away in the terminal? In most cases, each newline character should trigger the execution of the line as a command.
(more)
almost 2 years ago
Edit Post #283521 Post edited:
Edit title and remove tag
almost 2 years ago
Edit Post #283522 Initial revision almost 2 years ago
Answer A: What are IUSE flags?
IUSE flags are simply the list of available and default USE flags for a package as defined by the Ebuild maintainer. Definition IUSE is defined from a developer's perspective in `man 5 ebuild` (not `man ebuild`!): >IUSE > > This should be a list of any and all USE flags that are l...
(more)
almost 2 years ago
Edit Post #283521 Initial revision almost 2 years ago
Question What are IUSE flags?
Every Gentoo user knows USE flags. Occasionally I stumble upon IUSE flags, for example, `man emerge` mention them in the description of an option: > --newuse, -N > > ... > > USE flags may be toggled by your profile as well as your USE and package.use settings. If you would like to skip rebui...
(more)
almost 2 years ago
Comment Post #281869 How would unatended-upgrades package figure out that you, as a person, has access to root account? Also, from the `sudoers` file + (if needed) groups info it could figure whether the logged user has full, partial or no sudo rights, but it could hardly figure out whether a user actually has the sudo p...
(more)
almost 2 years ago
Edit Post #283088 Post edited:
Mention manual page; Add tag.
almost 2 years ago
Edit Post #283088 Initial revision almost 2 years ago
Question What does `emerge --update --newuse --deep @world` have to do with package removal?
In Debian-based distributions, one can update the system with `apt upgrade` and cleanup unused dependencies with `apt autoremove`. Period. On Gentoo that is apparently not as straightforward. From Gentoo Cheat Sheet: Package removal: > The recommended way to remove a package is by using `em...
(more)
almost 2 years ago
Comment Post #282695 The question describes that the GTK theme changes. This may be caused by the GNOME desktop environment. If you switch to a non-GNOME environment (no need to uninstall it, rather just don't start it), you might narrow down whether GNOME is to blame by looking at programs that use GTK, such as Firefox....
(more)
almost 2 years ago
Comment Post #282695 It's hard to tell what's going wrong. Can reproduce that behavior in a small and simple window manager (e.g. Dwm or Cwm)? GNOME is too pervasive for tracking things down...
(more)
almost 2 years ago
Edit Post #282408 Post edited:
A firmware tag should be appropriate.
almost 2 years ago
Edit Post #282411 Post edited:
Some users may already have configured sudoers, so let them choose to use sudo or su.
almost 2 years ago
Suggested Edit Post #282411 Suggested edit:
Some users may already have configured sudoers, so let them choose to use sudo or su.
(more)
helpful almost 2 years ago
Comment Post #282409 Great answer. I'm just wondering about the necessity of editing the modules files (see, for example, [Modules – Debian Wiki](https://wiki.debian.org/Modules#Automatic_loading_of_modules)). In my Debian system the wireless card firmware is auto-loaded at boot and all I ever had to do was to install th...
(more)
almost 2 years ago
Suggested Edit Post #282408 Suggested edit:
A firmware tag should be appropriate.
(more)
helpful almost 2 years ago
Comment Post #282372 If it contains a non-line, it is not a text file. See for example a more extended answer in [What conditions must be met for a file to be a text file as defined by POSIX?](https://unix.stackexchange.com/questions/446237/what-conditions-must-be-met-for-a-file-to-be-a-text-file-as-defined-by-posix). Al...
(more)
almost 2 years ago
Comment Post #281930 I don't really ask for a Platonic category of file, but for the POSIX category. Most text-processing utilities (sed, grep, awk, ...) assume text files in the POSIX specification. To keep my applications portable, I try to conform to POSIX. But then there are many users/editors that, for example, don'...
(more)
about 2 years ago
Edit Post #281930 Post edited:
Fixed misplaced hyphenation
about 2 years ago
Suggested Edit Post #281930 Suggested edit:
Fixed misplaced hyphenation
(more)
helpful about 2 years ago
Comment Post #281930 Indeed, I had only read `man 1p file`. To be honest I don't see how the information you bring explains the matter. Note that none of the files are reported as UTF-8, but instead the first three as "ASCII", the next two as "non-ISO extended-ASCII" and the last as simply "data". An important question: ...
(more)
about 2 years ago
Comment Post #281929 @celtschk Well, `file` is [POSIX specified](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/file.html), so I would suppose it conformed to POSIX idea of what a text-file is.
(more)
about 2 years ago
Comment Post #281929 @Moshi But then any kind of file would be a text-file, since you could say it contained zero lines. Even a file with a NUL would be a text-file. Instead, I interpret that if the file contains non-lines, then it is not a text-file. In that sense, an empty text file would be the only case for which "ze...
(more)
about 2 years ago
Edit Post #281929 Post edited:
Octal 200 cannot be the first byte of a character
about 2 years ago
Comment Post #281929 @Moshi True, I said 0x80 was straightforwardly invalid but it is not. Still, it cannot be the first byte of a valid character. It forcefully follows that neither file 4 nor file 5 are newline terminated or that they have an invalid character. File 3 is also not newline terminated (even in ASCII encod...
(more)
about 2 years ago
Edit Post #281929 Post edited:
Fix link that pointed to a irrelevant section; address Moshi's comment explaining why I think files 3 to 6 are non-text files.
about 2 years ago
Edit Post #281929 Initial revision about 2 years ago
Question Why does the file command fail to recognize non-text files as such?
POSIX defines - Text file as > A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINEMAX} bytes in length, including the \ character. - Line as > A sequence of zero or more non- \ characters plus a ter...
(more)
about 2 years ago