Questions tagged [command-line]
The command-line is the interactive interface to your shell.
6,156
questions
1
vote
2
answers
42
views
How to wait for the first command but not the second, where the two are joined by the && operator
I have a bash for loop like this:
for file in *.mp4; do
command1 "${file}" && command2 "${file}"
done
This makes command2 to run whenever command1 is successful, which ...
0
votes
0
answers
13
views
How to backup Thunderbird to mbox for use with the Pine or Alpine e-mail client?
How should the mbox backup from Thunderbird show? Perhaps there's a validation tool?
First screen:
ALPINE 2.25 FOLDER LIST ...
0
votes
0
answers
13
views
How to configure Thunderbird for local offline usage?
How would Thunderbird send such a message?
nicholas@mordor:~$
nicholas@mordor:~$ swaks --to [email protected] --from [email protected] --server localhost
=== ...
1
vote
1
answer
140
views
How to run the command "sudo sh /path/to/script.sh" by double clicking?
I have a question from this thread How to run a bash script by double clicking by entering the path in sudoers?. Since it was explained to me that it is unsafe to grant sudo privileges to the script....
0
votes
0
answers
21
views
LESSOPEN not working
LESSOPEN not working for me, don't know why.
In ~/.bashrc currently I have:
export LESSOPEN='| nl %s'
export LESS=' -R -i --use-color'
export LESSSECURE=1
but LESSOPEN doesn't seem to work. LESS ...
0
votes
1
answer
30
views
Understanding File and Directory Permissions in Unix-Like Systems
I have a scenario where I own a file in a directory, and I'm trying to understand the interplay between file and directory permissions. Specifically:
If I am the owner of a file, do I need both write ...
0
votes
1
answer
88
views
How to run a bash script by double clicking by entering the path in sudoers?
Using sudo visudo I add the line username ALL=(ALL) NOPASSWD: /home/user/script.sh in sudoers but the script.sh does not run on double click.
If I add the line username ALL=(ALL) NOPASSWD:ALL in ...
0
votes
1
answer
37
views
How to prevent messages from clogging terminal?
Recently, I have been programming a small game to run in the Linux Terminal. The game involves running an MP3 file from the terminal. However, when this runs using FFMPEG, it sends messages into the ...
-3
votes
2
answers
77
views
how to to execute a command output as an argument without saving it using $()?
This is actually for brew search
but to simplify, let's say I do:
echo -e 'somedir\n\otherdir'
somedir
otherdir
Can I use otherdir as an argument without doing this?
ls $(echo -e 'somedir\n\otherdir ...
0
votes
1
answer
29
views
How to run previous command with another command [duplicate]
Say I do:
ls somedir
is there a way I could re-run it with a different command?
Example:
ls somedir
<run same command as above but with cd instead of ls>
0
votes
1
answer
66
views
Markdown viewer for file list
I'm looking for a command line Markdown viewer for many .md files somehow similar to image viewers.
I need:
simple/fast navigation: preferably left, right arrows (no combinations like :n, :p),
and a ...
0
votes
1
answer
42
views
Persistent atop across reboots
atop shows total CPU time since the last reboot. How can I have it persist across reboots?
0
votes
1
answer
67
views
What is `xargs -P 0` exactly doing, and is it a good idea to use it?
xargs provides a command xargs -P 0, the doc mentions that is spawns as many processes as possible to run the commands in parallel. But is it stopping, e.g., at the number of available CPU, or ...
-1
votes
0
answers
32
views
Need help on how to read ls -l as I am new to this and still very confused [duplicate]
New to Linux but when I try ls -l I get
drwxrwxrwt
d---------
I have no idea what they mean but any help deciphering these will help.
0
votes
0
answers
42
views
Mounting an old JBOD array with two disks DOS formatted
I have a couple of 500GB disks with data inside that I would like to get back. The two disks were mounted inside a Lacie disk, part of a JBOD array and formatted FAT32.
I don't have the external disk ...
0
votes
1
answer
40
views
Rename files with Parent Directory Name
I want to rename file name with it’s parent folder name, adding folder name before file name.
Folder Structure:
1
A.jpg
B.jpg
C.jpg
2
A.jpg
B.jpg
C.jpg
Expected results:
1
1A.jpg
1B.jpg
1C.jpg
2
2A....
0
votes
1
answer
24
views
Choosing a location for installation of Docker Desktop app’s CLI tools
When completing the installation of Docker Desktop 4.25, the Advanced Settings offers a choice:
Choose how to configure the installation of Docker's CLI tools:
System (requires password) Docker CLI ...
0
votes
0
answers
22
views
How to avoid restarting a long running and slow starting python program when executed from a shell script?
I use Whisper to transcribe sound files. On my hardware it takes several minutes, if not dozens of minutes just to start it (it needs to load and process several GBs of data every time it is launched)....
0
votes
1
answer
50
views
How to copy all FLAC tags using ffmpeg?
I'm using ffmpeg to perform audio filtering on my music library. However, it is not copying all FLAC tags (in particular, it's dropping chapter information).
Copy all tags from one FLAC file to ...
1
vote
0
answers
20
views
How to enable sh emulation mode only when using zsh interactively
When using zsh interactively, I would like it to emulate the behavior of sh as much as possible. I have tried adding emulate sh to the end of ~/.zshrc, but since I am using zsh plugins that rely on ...
0
votes
1
answer
78
views
How can I write a function that returns the results of a one-line `node` script?
I'm trying to write a very simple bash function that uses a one-line node script to read the value of a key from a JSON file. Here's the current contents of utils.bash:
#!/bin/bash
project_name() {
...
0
votes
0
answers
58
views
xargs cat a file with aws cli (amazon s3 move)
I have a file called file.csv, which is a list of the files (or more precisely, file paths path in an S3 Bucket) that need to be moved to another folder in s3.
This file lists 53,00,000 files. I have ...
0
votes
3
answers
73
views
How to interactively edit a file name from the terminal like with a file manager?
At the command line, one can rename a file by specifying the entire new name to mv
mv oldname newname
or using a regex with e.g. Perl's file-rename command.
rename -d 's/old/new/' oldname
But is it ...
0
votes
3
answers
72
views
simple question regarding moving files and folders
I am a noob, gains are slow. working on moving things around, playing.
Command: mv man-pages(man-pages folder) /bob. instead of moving the man-pages folder(directory?) to directory bob, it took all 10 ...
0
votes
0
answers
94
views
How to check & adjust sound volume from the command line with pipewire-pulse?
Of course I found this closely related question. However, nothing there works with this modern Fedora installation.
uname -a says it's "Linux 6.4.15-200.fc38.x86_64".
If it matters, here are ...
1
vote
1
answer
229
views
How to find the port number given the ip address
I could find the ip address of my board by using ifconfig but I need the port number as well to set Linux TCF agent. I tried netstat with several options but could not find as it returns too many and ...
0
votes
1
answer
22
views
Finding on each folder if a subfolder respect the convention name according to the folder name?
i have a "sites" folder with a number of site folder named:
bu.my-url.com
dud.myurl.com
[must-be-indentical_string].myurl.com
etc
On each site folder, I'd like to check if the /themes/amu_[...
0
votes
1
answer
86
views
"man cat" mentions "LFD." What is "LFD?"
man cat says:
-v, --show-nonprinting
use ^ and M- notation, except for LFD and TAB
I checked info cat, and it uses the same acronym:
‘-v’
‘--show-nonprinting’
Display ...
0
votes
1
answer
68
views
Are there commands for execute XFCE's menu entries to reboot or power off/shut down?
There is Herunterfahren(DE)/Shut Down and Neustarten (DE)/Reboot:
Is it possible to execute these GUI entries from the command line? If so, what exactly are the commands?
I already checked XFCE's ...
1
vote
1
answer
72
views
With what command is possible know the mainboard requirements about the RAM?
For a computer and/or laptop used for developing and as server purposes, of course, it according with the hardware itself.
Question
With what command is possible know the mainboard requirements about ...
3
votes
1
answer
950
views
Command(s) to know If the current RAM installed by slot is ECC/Non-ECC and Buffered/Unbuffered
About RAM for laptops I did realize that is available
ECC
Non-ECC
Buffered
Unbuffered
It according with:
Kingston Technology KVR16LS11/8 8GB 1600MHz DDR3L (PC3-12800) 1.35V Non-ECC CL11 SODIMM ...
0
votes
1
answer
27
views
How to download using command line tools with a secondary (backup) source?
I use wget, rsync and curl to download files regularly (via https or ssh). One issue when I travel is that servers that are fast to access in one region become slow (or even inaccessible) in another. ...
1
vote
1
answer
139
views
Creating a compressed image of an exFAT USB drive using dd
My system is running Ubuntu 22.04.3 LTS. I plug a USB drive into that system. That USB drive (/dev/sdb) contains an Ubuntu installation, mostly in an ext4 partition (/dev/sdb3). That installation ...
0
votes
0
answers
66
views
Per-user cumulative CPU time across reboots
I have installed the process accounting package (acct) and recorded data.
Using sa --print-seconds --user-summary | grep "$USER", I get the process account summary for my user:
wjwrpoyob ...
0
votes
1
answer
26
views
How to restore the last trashed file using a non-interactive command?
Say I just moved a file to trash from a file manager or using a command-line implementation such as kioclient move my_file trash:/.
Can I restore it with a single, non-interactive command?
trash-cli ...
-1
votes
2
answers
73
views
Hard link linux [duplicate]
The Linux Command Line
William Shotts
Page 33
[me@linuxbox playground] $ ls -1
total 16
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir1
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir2
-rw-r—r— 4 me ...
-1
votes
1
answer
65
views
creating hard links Linux question [duplicate]
From the book The Linux Command Line by William Shotts, page 33:
So now we have four instances of the file fun. Let's take a look at
our playground directory.
[me@linuxbox playground]$ ls -1
total 16
...
0
votes
1
answer
46
views
When is useful use "silent" for tty?
If the tty --help command is executed it shows
tty --help
Usage: tty [OPTION]...
Print the file name of the terminal connected to standard input.
-s, --silent, --quiet print nothing, only return ...
0
votes
2
answers
59
views
How to know what is the current tab - number or position - for any Window Terminal?
For Ubuntu and Fedora if is opened a Window Terminal through ctrl + alt + t then is possible open a new tab through shift + ctrl + t. Suppose exists a Window Terminal with 5 tabs. If possible go to ...
0
votes
0
answers
23
views
Looking for a config file in fedora (33) where the basic terminal parameters for a CLI login are stored
I am running a Fedora 33 server instance in Virtualbox with login at the command line.
(No xserver)
Within the virtualbox CLI display for this server, I want to find out if there is any way to expand ...
1
vote
0
answers
26
views
"Access Denied user root error code 1045 (28000)" after changing root passwords
I'm encountering an "Access Denied user root error code 1045 (28000)" error with user root. I'm facing this problem after changing passwords. It was working fine before, and I'm confused ...
0
votes
1
answer
97
views
Keep getting NS record query failed: NXDOMAIN on Kali Linux dnsenum commands
the URL does not matter seeing as I have changed it to different websites multiple times
I am new to Kali and Linux in general
┌──(admin㉿LAPTOP-JCHDG93R)-[~]
└─$ dnsenum --noreverse -o mydomain.xml ...
0
votes
0
answers
41
views
What is a CLI helper/wrapper that allows a dumb CLI program to have a command history? [duplicate]
Many years ago I came across a simple utility that would handle the keyboard interaction for any CLI-based program that did not support command history. This tool would keep track of the commands you ...
1
vote
0
answers
40
views
Command to open directly "download new plasma widgets"
Widgets are an essential part of Plasma/KDE, and I have always found rather odd and cumbersome the way of accessing the interface to install them, by
right-clicking the panel or the desktop,
...
0
votes
2
answers
21
views
How to open a file starting with dash via xdg-open
Usually, a double dash separates options from filenames, but xdg-open does not care:
❯ xdg-open -headlinesAfter.epub
xdg-open: unexpected option '-headlinesAfter.epub'
Try 'xdg-open --help' for more ...
0
votes
1
answer
153
views
How to resize partition in-between other partitions (CLI)?
How can I resize some partitions on a disk where there are other partitions before and after it?
I've found plenty of guides on the Internet about how to resize a partition (eg with parted), but they ...
0
votes
1
answer
46
views
How to tell convert command to skip a page in pdf?
I want to split a PDF page because it scanned two page at the time and I found this useful command:
convert in.pdf -crop 50%x0 +repage -density 400 out.pdf
But now I want this command to skip ...
0
votes
0
answers
16
views
Tool to show memory that would be freed if I terminate a process and its sub processes?
I know that it's a bit tricky to show the memory that a process is using due to the fact that there is memory shared.
But when I look at memory diagnostics, it's normally because my memory is getting ...
-1
votes
2
answers
100
views
Why pipe keep sudo and redirection not? [duplicate]
Pipe (|) and redirections (<, <<, >, >>) both using standard streams (stdin, stdout, stderr), but although only pipe can keep sudo privileges, why?
Works:
sudo echo "hello" ...
0
votes
1
answer
42
views
Huge number of packages are about to be deleted after Debian upgrade, how to check list in text mode?
I am about to upgrade from Debian 11 to 12. I pressed Ctrl+Alt+F3 and entered text mode to ensure a smooth upgrade.
Update & Upgrade system
$ sudo apt update
$ sudo apt upgrade
Edit /etc/apt/...