Questions tagged [command-line]
The command-line is the interactive interface to your shell.
6,259 questions
0
votes
1
answer
28
views
Start Script with SSH Session Name and Date Time
I am a network engineer, and I am trying to transition off of using programs like securecrt into fully linux based. However, the biggest thing keeping me from migrating is logging SSH output into ...
0
votes
0
answers
22
views
ssh default module bits. How many bits in the ssh default module? [closed]
I need to Enable VTY SSH only with default module bits, but i don't know what is the default module bits for ssh.
i write this command
#line vty 0 15
#crypto key generate rsa
but asks me for module ...
0
votes
0
answers
45
views
What are the Busybox od command options?
Busybox
The Busybox documentation explains only this:
od [-aBbcDdeFfHhIiLlOovXx] [-t TYPE] [FILE]
Write an unambiguous representation, octal bytes by default, of FILE to standard output. With no FILE ...
0
votes
0
answers
34
views
When HDMI is plugged into computer, run script
Setup
Headless single board computer (this one) which has an HDMI input
(To clarify, this is a port which takes in HDMI like a monitor would. It will receive HDMI feed, not export it, like a computer ...
1
vote
3
answers
65
views
How do I merge bottom line with previous line? [duplicate]
I have a pretty basic file;
15
Chapter name
some text and some more text
some text and some more text
I was trying to get something like this
Book: 15 Chapter name
some text and some more text
some ...
3
votes
1
answer
163
views
Show non-truncated usernames of users connected to sshd server in terminal?
On my Ubuntu server, I find it very useful that netstat -tulpn also shows the username connected to sshd (apparently, this username printing is specifically for sshd) - unfortunately, this printout is ...
1
vote
3
answers
84
views
how do you remove spaces in email addresses using sed?
I have a file with thousands of email addresses with a space inside the email address that shouldn't be there...
(example Aaliyah, Graves: Graves [email protected]) as pictured above...
I'd like to ...
-1
votes
2
answers
63
views
Does this exist: xterm bash in frame window custom? [closed]
Is there a style to [xterm + bash scripts, commands] inside a custom frame?
i will wish this style, see example:
╭─────────────────────────┤text title1├────────────────────────╮
│ ...
0
votes
1
answer
60
views
Find and delete all duplicate files by hash
As the title suggests, I'm looking to check a bunch of files on a Linux system, and keep only one of each hash. For the files, the filename is irrelevant, the only important part is the hash itself.
I ...
2
votes
2
answers
156
views
turning list of file paths from one command into command-line arguments for another
I want to pass a list of file paths produced by one command (the KDE baloosearch6 program) as command-line arguments to another command (the KDE gwenview image viewer program). The age-old problem is ...
-1
votes
1
answer
133
views
How to modify a Windows ISO image on Linux?
I am using Ubuntu. I have a Windows 10 consumer ISO image and I want to modify the ISO to remove all editions from it but keep the Pro edition and that will be in index 4, and need to do all that work ...
0
votes
1
answer
21
views
Notify Ubuntu/Gnome using script that application is busy to prevent power off
When using "Power Off" action in Gnome if there are some GUI applications with unsaved changes (for example, text editor) there will be label "Some applications are busy or have unsaved ...
2
votes
1
answer
72
views
linux shell ctrl-C doesn't work (using busybox)
I'm working on an arm64 system (Arm PL011) and I have ported linux 5.15.68 using u-boot-spl , busybox.
In the past, I could use Ctrl-C in the linux shell by entering
setsid cttyhack sh
But somehow it ...
0
votes
1
answer
60
views
Problems updating /etc/hosts file via command bash -c
Trying to update host configuration file via command :
$ sudo bash -c 'echo $(minikube ip) blue.io green.io >> /etc/hosts'
Command was passed, but host configuration file /etc/hosts was not ...
1
vote
1
answer
111
views
Switching from X11 to Wayland in KDE: finding alternatives for xset, xgamma, and other command-line tools
I am trying to switch from X11 to Wayland in KDE (Fedora 40). Several of commands I used do not work anymore, like xset, xgamma, etc. Of course, I tried to look for alternatives/workarounds, and ...
0
votes
0
answers
51
views
s-nail error: cannot configure mailboxes on virtual mail server
I am trying to send mail from the command line as root using s-nail via a SMTP server.
I have a bespoke /etc/.mailrc file associated with an account with the login details of the SMTP server.
My MTA ...
0
votes
1
answer
59
views
What if I don't want to display the first directory in the find command?
I don't want to display the first directory component of paths printed by the inner find command from the below example
find . ! -name . -prune -type d -exec sh -c '
for dir do
echo "\n\n${dir#.*/...
0
votes
1
answer
14
views
How to browse to local_file.html#anchor fragments on the ChromeOS Linux command line?
nurdsborough@penguin$ ls
info.html
nurdsborough@penguin$ garcon-url-handler info.html #works
nurdsborough@penguin$ garcon-url-handler info.html#anchor #fails
What is the workaround?
0
votes
1
answer
64
views
Find MAC addresses of connected Wii Remotes
I want to connect one or more Wii remotes for reading their inputs. From the output of cat /proc/bus/input/devices I can extract data like Sysfs and the input Handlers. The Handers information I use ...
0
votes
2
answers
601
views
Opening .xlsx file in linux terminal
I work in a cluster. I would like to ask if it is possible to open .xlsx files in text editors like nano or vim.
Is there any possible way if I have not Microsoft Excel (or any relevant application in ...
0
votes
1
answer
90
views
Command-line option to disable too many processes in htop
By default, htop shows many more processes than other tools (top, ps). The solution is to press H, as mentionned in Why are there many processes listed under the same title in htop?, to get the "...
1
vote
0
answers
36
views
Going to the direcory of a file as fast as posible [duplicate]
Is there a way to get to the path of a file as fast as possible and in the least amount of keystrokes.
Context:
Type cd and then paste the path of a file and then have to go back and hit backspace ...
0
votes
1
answer
50
views
Looking to add or append terms in multiple lines using sed command
On our intranet server, we have a control record with almost a hundred lines, with each line corresponding to a program. Each line has the usernames afterwards of each user that can access and use ...
23
votes
2
answers
5k
views
High CPU usage by process with obfuscated name on Linux server – Potential attack?
We have been experiencing high load issues on our Linux server recently. Upon checking with the
top
command, we noticed an unknown process with a garbled command name (as shown in following images; ...
0
votes
0
answers
26
views
how to use `vi`/`vim` in cli mode like `sed` [duplicate]
i need to replace some strings and due to some reason, vi or vim is my only options.
but the problem is i need this to be done in a shell script, is it possible to use vi/vim in cli mode like sed?
e.g....
0
votes
1
answer
38
views
Could linux give clearer error messages to distinguish files from directories?
mkdir temp
mkdir: cannot create directory ‘temp’: File exists
rm temp/
rm: cannot remove 'temp/': Is a directory
Is there any reason why the first error message should not be "Directory exists&...
0
votes
1
answer
40
views
How to launch a GUI-application from terminal while keeping the terminal on the front and the cursor on terminal
Let's say I want to launch an application from the terminal but I want to keeping the terminal on the front and the cursor on terminal
e.g.
$ mupdf somepdffile.pdf
Is there a way to do it?
-2
votes
1
answer
100
views
Trying to mount a drive, but Mint can't find it?
I'm trying to mount the NTFS partition as described here https://linuxconfig.org/how-to-mount-partition-with-ntfs-file-system-and-read-write-access
The system is installed on sda5 and mounting sda1 is ...
0
votes
1
answer
268
views
"_split_longopt: command not found" when trying tab-completion
For the past couple of weeks or so, I've noticed that, often, when I press the Tab key to try and complete a command in a bash shell in a terminal, I get an error message. It says:
bash: ...
-1
votes
1
answer
111
views
pkexec vs runuser
pkexec is not installed by default on Debian unlike runuser which is.
So far I've been using pkexec but discovered there is also runuser, and since runuser seems to be more advanced (looking at ...
3
votes
2
answers
605
views
How to limit the number of files printed by ls and print them in columns like ls prints normally?
Here is extension of the question: How do I limit the number of files printed by ls?
with additional condition: how to print results in as many columns as fit to the current terminal width — as ls ...
0
votes
0
answers
66
views
Why is `mv -f source target` so much slower than `rm -f target && mv source target`
I got a case where I need to overwrite some file with another and noticed a very significant slowdown when using "mv -f" if the target already exists and is being read. More specifically, ...
0
votes
1
answer
47
views
Is the idea of having a login shell and a non-login shell merely a way of making user preferences? [duplicate]
Scouring the internet about the difference between a login shell and a non-login shell, it turns out that the ultimate difference is merely the files that are being sourced. A login shell sources some ...
1
vote
3
answers
140
views
Bulk Resize Images of Different Aspect Ratio so that all have Same Width
I am trying to resize multiple images inside of a folder so that all images have the same width, keeping aspect ratio. The images are all different sizes and aspect ratios. I don't care about the ...
8
votes
3
answers
726
views
Is there an equivalent of caniuse for commands on posix systems?
I'm thinking about using a callout to the jq command in a utility script I'm writing, rather than parsing JSON manually.
In order to make the script as portable as possible, I want to know which ...
0
votes
3
answers
65
views
Play sound after command and also pipe output
I can easily pipe the output of a command like:
some_command | less
I can also easily play a sound after a command like:
echo test; print \\a
aplay, beep or others could also be used for sound.
...
1
vote
1
answer
118
views
Bash completion after quotation mark
I am experimenting with bash completion to write a general completion library in C associated with command line parsing and stumbled in a behavior for which I can find no documentation.
I am using the ...
-2
votes
1
answer
41
views
Is there a port of the Windows' REN command for Unix-like operating systems? [duplicate]
I already know the rename command in GNU/Linux. However, it is very complicated and cumbersome because it uses regular expressions.
For example, in Windows, I can simply rename files in bulk by typing:...
4
votes
4
answers
1k
views
How can one count how many pixels a GIF image has via command line?
I use Ubuntu. I have a large number of GIF images. How can one count how many pixels a GIF image has via command line?
-4
votes
1
answer
91
views
Find actual file by only file name, not literally everything non-related
PuTTY/SSH and logged in as root I simply want to find any instances of the file PEAR.php.
I've looked through a dozen different tutorials but they seem to just copy-paste the same instructions. An ...
0
votes
4
answers
477
views
command-line tool to sum the values in a column of a CSV file
I am looking for a command-line tool to calculate the sum of the values in a specified column of a CSV file. (Update: The CSV file might have quoted fields, so a simple solution just to break on a ...
1
vote
1
answer
164
views
Is there any sort of command-line tool I can use to detect and write metadata for a song's key?
I would like to get into DJing, or at least putting songs together in series and making it work. I have already used bpmwrap to tag the tempo for every song in my library, and it immediately made me ...
0
votes
1
answer
99
views
rpm -qa but filtering for partial package name match?
I'm learning about the rpm package manager command. I figured out how to use rpm -qa however the list exceeds the overflow of the SSH program so I can't see the entire list.
How do I use the rpm ...
0
votes
1
answer
77
views
open vpn - not working but also dont returns any error
i have both open vpn server and client. the client is my windows pc and the server is a ubuntu 22 VPS.
im running openvpn on the serverside with this command :
openvpn --dev tun --ifconfig 172.16.0.1 ...
1
vote
0
answers
79
views
Shell: Customizing the "Display all N possibilities? (y or n)" message
I already know that double-pressing the Tab key on Bash terminal will enlist all files and folders in the current working directory or, when appropriate, show Linux executables that I can run. I want ...
-1
votes
2
answers
201
views
How to print out all printable ASCII strings contained in binary data?
How can I print out all printable ASCII strings
(e.g., longer than four chars) contained in a binary file?
0
votes
2
answers
168
views
command suggestions while typing for beginners
When typing the commands in any shell, can there be any kind of setting that can be enabled for beginners to type just an alphabet and it will suggest multiple commands that the beginner might be ...
1
vote
1
answer
141
views
Shell script to run command and show output in notification box
I have command line utility that generates text strings, by running a command within the directory:
./Utility -P
it prints output on terminal. How to make a shell script showing the generated string ...
-6
votes
1
answer
82
views
Finding difference between two Linux Commands
How to find the difference between rm and rmdir commands in Linux Bash Shell?
-1
votes
1
answer
224
views
How can I solve this error in wifislax 4.9
I can't understand why the commands not work please help me