41
votes
What are Non-GNU versions of terminal commands?
Taking a more direct approach, here are the major options other than the GNU utilities:
The BSD userland utilities:Originated with the early versions of Berkely Unix, in which they were just regular ...
29
votes
What are Non-GNU versions of terminal commands?
I thought GNU was the (only) supplier of essential tools whose open-source code powers Linux distributions.
No. Not at all. Stallman & co do like to paint that picture as if it's "GNU/Linux ...
16
votes
What are Non-GNU versions of terminal commands?
GNU Coreutils in general are not the original version of most of those tools. Typically they are supplied by the operating system and since most flavors of Linux are GNU/Linux you are most familiar ...
11
votes
Accepted
Getting italics working correctly in tmux
Inside tmux, the program that produced the output on your screenshots "thinks" the terminal does not support italic mode. The program does not try to use italics, it chooses to manipulate ...
11
votes
What does >&- do in a unix / linux terminal?
Quoting the POSIX specification for the sh language:
2.7.6 Duplicating an Output File Descriptor
The redirection operator:
[n]>&word
shall duplicate one output file descriptor from another, or ...
11
votes
Open PDF from a command line and go back to the command line
You don't actually need to press enter, you can use the terminal directly. What happens is that evince can print out various messages to standard error, so those make your temrinal look like it isn't ...
10
votes
Accepted
Alternatives to file polling?
You could create a named pipe with mkfifo instead, and read that. Reads will block until something has written to the pipe, no manual polling required. Something like:
tmp_input=$(mktemp -d ./...
10
votes
Is the difference between physical terminal and Linux virtual terminal the use of serial cable?
No, it's not the use of serial cable that distinguishes between physical terminal and virtual terminal.
The reason why Linux virtual terminal is called "virtual" is because Linux itself ...
7
votes
Accepted
Command line glob to view multiple images using ImageMagick's display
If you don't specify a delay, imagemagick will load the first image and wait for your input, that is
SPACE - load next image
BACKSPACE - load previous image
If you want to display the images in ...
7
votes
Accepted
Use arrow keys in the middle of command
I’m not sure it can be done with arrow keys, but you can use history shortcuts:
!-3 && !-2 | !-1
!-3 will be replaced by the third-last command, !-2 the second-last, and !-1 the last.
7
votes
Accepted
How to replace both lower and uppercase extensions with Parameter Expansion?
I don't think you can make the pattern match in ${filename%.doc} case-insensitive in Bash. You could do it zsh, with ${filename%(#i).doc} (requires setopt extendedglob enabled) or ksh93 with ${...
6
votes
Accepted
How do I trace a Linux command in terminal to see which files it uses as it executes?
You can run it with strace -e file:
strace -e file /path/to/command
This will list all system calls involving a file name on standard error. You can output the list to a file instead using the -o ...
6
votes
How to replace '8' with '7' in a single step?
In Bash, if you have history expansion enabled (which is on by default though some disable it), then entering ^old^new will re-run the last command with a substitution applied (I think it's short for !...
5
votes
Accepted
Error With gtk-launch: Unable to find terminal required for application
As of 18-09-2023: The list of hardcoded terminals here is
static const struct {
const char *exec;
const char *exec_arg;
} known_terminals[] = {
{ "xdg-terminal-exec", NULL },
...
5
votes
What are Non-GNU versions of terminal commands?
This must imply that there are versions of ls that are not provided by GNU, right? What are these versions, who make them and where can I find them?
Yes. The original implementation of ls under the ...
5
votes
Accepted
apt randomly switches languages ever since I installed Arabic on my Pop!_OS running KDE Plasma
The LANGUAGE environment variable is specific to GNU gettext (and therefore influences the programs using gettext as a way to ease their internationalization)
You define LANGUAGE=en_US:en_US:en_US:ar
...
5
votes
Alternatives to file polling?
Have you heard of inotifywait?
It sounds like what you want.
(I often use entr to execute on file changes - but I think you can achieve your goal with inotifywait.)
5
votes
How to replace both lower and uppercase extensions with Parameter Expansion?
You don't. Just remove the extension entirely instead:
find "${COMPANYPATH}" -iname '*.doc' | while read -r file; do
echo "${file}"
filename=$(basename "${file}")
...
4
votes
Accepted
screen -t <titlename> , does not set screen title properly
This is from the category "It's not a bug, it's a feature!"
The problem is the bash (maybe the same or similar in other shells) variable PROMPT_COMMAND which is set by default in your ...
4
votes
Accepted
Change Filenames Based on List in .txt file in Terminal
Maybe you can try something like:
while IFS=$'\t' read -r oldname newname
do
mv -- "$oldname" "$newname"
done < filenames.txt
In this way, you set a delimiter (IFS) to read ...
4
votes
Accepted
When is useful use "silent" for tty?
#!/bin/sh
# Script that is run regularly from cron,
# but also sometimes from the command line.
interactive=false
if tty -s; then
echo 'Running with a TTY available, will output friendly ...
4
votes
Accepted
What is the hot key to show the next command of the previous command in history in Linux/bash?
...
Press [Up] ---> prompt showing echo 1
Press [Ctrl-O] (that's the letter o, not zero) ---> echo 1 is executed, prompt showing echo 2
Press [Ctrl-O] ...
The hotkey can be changed in .inputrc, ...
4
votes
How to replace '8' with '7' in a single step?
Assuming you're using bash, the overwrite mode is disabled and not bound to any shortcut by default:
Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. ...
4
votes
"set editing-mode vi" v/s "set -o vi" what is the difference?
The .inputrc settings will take effect in all applications that use libreadline, including but not limited to bash.
set -o vi in .bashrc will affect bash only.
4
votes
Accepted
"set editing-mode vi" v/s "set -o vi" what is the difference?
.inputrc (and /etc/inputrc) is the configuration file of the GNU readline library. readline is developed alongside bash and both are currently maintained by Chet Ramey, but it's also used by many ...
4
votes
Accepted
How to run the command "sudo sh /path/to/script.sh" by double clicking?
EDIT
Since you edited your comment to provide more information, I can now give you a complete answer. I verified with my friend who runs KDE plasma, and he says that the default behavior is that ...
4
votes
Accepted
How to delete rows that contain 0 in the "last column" in a linux terminal?
What I would do:
awk '$NF != 0'
Or, since bed is a tab separated format that allows spaces within fields:
awk -F'\t' '$NF != 0'
$NF is auto-magically the last column¹.
If the last column is 0², then ...
4
votes
Alternatives to file polling?
tail command has a -f/--follow flag which tells it to "output appended data as the file grows". Then you can use the head command to wait until the first line is written to the file.
...
4
votes
How to match a pattern instead of a single letter/number using brackets?
Not actually globbing, but ...
Recent versions of Bash can do Regular Expressions based matching with its RegEx operator =~ when used in extended test brackets [[ ... ]] ... It can do capture groups (....
4
votes
Accepted
How to match a pattern instead of a single letter/number using brackets?
[MSG] as a glob pattern matches any one of the characters M, S or G. To match either of MSG, DOC or PDF, you use (MSG|DOC|PDF) in zsh or @(MSG|DOC|PDF) in ksh. bash doesn't support zsh glob operators ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
terminal × 4322bash × 794
linux × 657
shell × 452
command-line × 318
macos × 244
ubuntu × 226
shell-script × 203
colors × 203
ssh × 202
tty × 173
tmux × 162
zsh × 157
debian × 150
gnome-terminal × 137
terminal-emulator × 131
keyboard-shortcuts × 128
gnu-screen × 114
console × 102
escape-characters × 101
xterm × 96
vim × 92
centos × 78
process × 78
linux-mint × 74