Questions tagged [command-line-interface]
A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
1,583
questions
10
votes
6
answers
67k
views
How to find the browser versions from command-line in Linux & Windows?
In ubuntu when I just open a terminal and say
"firefox -v" or "konqurer -v"
it prints all the version information.
But, I am not able to find how to go about this for
Chromium on Linux & ...
1
vote
2
answers
5k
views
How to get URLs for requests currently served by Nginx?
As the title explains, I want to know the URLs for requests that are currently being served by Nginx, all the answers regarding nginx_status endpoint talk about the number of requests, if possible I ...
1
vote
1
answer
65
views
CLI tool to monitor file size growth, transfer rate, and calculate progress bar/ETA?
I have a Proxmox job, and I'm running a backup job via the web UI. (I'm guessing it just uses the Proxmox vzdump command under the hood.) The final QEMU disk will be close to a TB in size, so I'd like ...
137
votes
14
answers
181k
views
What's the reverse DNS command line utility?
What's the command to find the name of a computer given its IP address?
I always forget what this command is, but I know it exists in Windows and I assume it exists on the *nix command-line.
22
votes
4
answers
18k
views
How to edit command completion for ssh on zsh?
I'd like to set up command completion on zsh to display host names after I type
ssh [TAB]
taking the names out of my .ssh/config file (and preferably from known_hosts and /etc/hosts and anywhere ...
2
votes
1
answer
6k
views
How to install packages from command line on Suse
What is the Suse version of apt-get or yum? Or how do I get one of them installed in order to install software packages from the command line?
A fairly intense session of googling suggests that it may ...
32
votes
13
answers
218k
views
How to get the count of all files in current directory?
What command would you use in cmd.exe to find the number of files in the current directory?
Is there a PowerShell option here?
Update: I was hoping to avoid dir, as I know there are 10,000+ files in ...
8
votes
3
answers
3k
views
Take screenshot of rendered HTML from Linux without GUI
Is there any smart tool or anything I can use to take a screenshot of a rendered localhost website on a Linux server without monitors?
I am using Rocky Linux 9 and I have done group-install of "...
0
votes
0
answers
14
views
Run program on incoming call w/ SIP (callmonitor) on Linux
Friends,
I'd like to run a custom program whenever a SIP call is received, similar to common call monitoring UIs. I do not need any (G)UI for this. I imaginge something like:
/usr/bin/the-imaginary-...
0
votes
1
answer
76
views
What is the difference, if any, between runai suspend + runai resume vs. runai delete + clone job via UI?
What is the difference, if any, between runai suspend + runai resume vs. runai delete + clone job via UI?
Both runai suspend and runai delete delete logs and any data saved on the container, so I don'...
0
votes
0
answers
34
views
How can one clone a runAI job via command line?
The runAI web UI allows users to clone jobs. How can one clone a runAI job via command line?
0
votes
0
answers
16
views
Xenserver Template Storage Dependency - VM Creation Issues on Different Hosts
I'm working with XenServer (XCP-ng) and have encountered an issue with VM creation from templates. Here's the scenario:
Three storage repositories (SRs) on separate hosts (host1, host2,
host3).
A ...
68
votes
3
answers
32k
views
GNU less: How can I search while ignoring case sensitivity without using less -I option?
From GNU less manpage
-i or --ignore-case
Causes searches to ignore case; that is, uppercase and lowercase are considered identical.
This option is ignored if any uppercase letters appear in the ...
3
votes
5
answers
5k
views
Search and delete lines matching a pattern along with comments in previous line if any
I have a requirement to write a shell script in csh to search and delete lines matching a pattern along with comments in previous line if any. For example if my file has the following lines
Shell ...
0
votes
1
answer
166
views
CloudLinux Terminal CLI command to get OS version
On the documentation page (https://docs.cloudlinux.com/shared/command-line_tools/) there are nearly 300 instances of the word "version" and skimming through it goes in to users, programming ...
0
votes
0
answers
210
views
Trying to pull the first word from a text file that has a username password format and pass it to a command
I have a text file. It appears similar to this:
john-doe password
I want to pull the username from the list and use it to add the user to a group:
net localgroup "remote desktop users" ...
0
votes
1
answer
83
views
Query Windows RDP monitor positions via command line
I am using Windows RDP (remote desktop) with a multi-monitor setup and I want my script to automatically detect the position of the monitors. Additionally, I only use some of my monitors for RPD with ...
2
votes
5
answers
2k
views
In bash how do you delete a partial word similar to ctrl-w
Say I have a directory with one file in it
mylongfilename.blahdeblah.txt
now the keystrokes
mv [tab] [tab]
will result in
mv mylongfilename.blahdeblah.txt mylongfilename.blahdeblah.txt
on my command ...
11
votes
12
answers
19k
views
Is there an easy command line tool for packet sniffing a single command on linux?
I'd love if there was a single command line tool for packet sniffing a single command in Linux. something like sniff dumpfile command so that you could just run the command you want to packet sniff in ...
0
votes
0
answers
129
views
Long running PHP script get terminated and other separate PHP cmd line processes as well
Env: Ubuntu 22.04.4 LTS PHP 8.1 CMD line scripts started with the & and left to run in the background
I have 3 separate PHP scripts which I started from an SSH session and are placed in the ...
5
votes
1
answer
6k
views
How to compile capacity and used capacity of an EMC VNX via CLI?
I'm automating a report that will essentially duplicate the information shown in the Storage Capacity Summary chart from the EMC Unisphere web interface. I need to perform this from the command line ...
1
vote
2
answers
2k
views
GOOGLE_APPLICATION_CREDENTIALS where is it?
I am trying to follow the directions to use cloud translation.
At https://cloud.google.com/speech-to-text/docs/quickstart-protocol?hl=en_US are the instructions, but I am not clear on these.
I have ...
6
votes
3
answers
8k
views
How do I change the bg color of chmod 777 directories in tcsh?
On my MacBook Pro, I have iTerm and use the (black background) Pastel color set. World writable directories show up with a yellow background behind grey text. This I can live with, since the grey is ...
6
votes
2
answers
3k
views
What Emacs package should I install for command-line on FreeBSD?
I'm newbie on BSD.
I installed FreeBSD with minimal configuration, so there's no package installed.
I tried pkg_add -r emacs, the command tried installing many of X11 related packages (not sure, but ...
32
votes
8
answers
100k
views
How to check IPv6 address via command line?
How do I check the IPv6 address via command line?
For IPv4 I simply use:
curl ipinfo.io/ip
This doesn't work for IPv6.
14
votes
5
answers
7k
views
Handy parsing for numbers with unit suffixes?
Let's say you have data with quantities in human-readable format, such as the output of du -h, and want to further operate on those numbers. Let's say you want to pipe your data through grep to do a ...
177
votes
11
answers
360k
views
Run a .bat file in a scheduled task without a window
I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see.
I ...
105
votes
11
answers
111k
views
How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?
How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?
7
votes
4
answers
19k
views
Listing of files recursively with modified time in tree-like format
I'm looking for a single command to list all files recursively from a given directory along with its modified time. It would also be nice if it can produce output in a tree-like format as produced by ...
13
votes
3
answers
11k
views
Why `wc -c` always count 1 more character?
in tmp I type a single character,but wc -c shows 2,why?
2
votes
2
answers
7k
views
Printing a '$' (dollar sign) to a file
I want to echo/printf a dollar sign into a file - but echo $ > myfile or such does not work (not surprising).
I tried escaping it like echo \$ > myfile but it is also not working.
What is the ...
1
vote
5
answers
4k
views
AWS Windows EC2 instance does not recognize assigned IAM role
Initially I launched a brand-new Windows Server 2016 server EC2. I assigned a S3 full admin IAM role to this instance when launching it. I installed CLI on it. I started a CMD window, and typed in "...
2
votes
5
answers
34k
views
How to change my commandline locale after CentOS decided to change it?
So apparently, CentOS decided I was Dutch, and thus, should not have a English locale.
Apart from the fact that this greatly bothers me, I am having a pretty hard time actually changing it back. ...
5
votes
3
answers
28k
views
Using ROBOCOPY to MOVE data around, not copy it
I have the following powershell script, which executes a few robocopy commands:
ROBOCOPY.exe $q3 $q4 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD
ROBOCOPY.exe $q2 $q3 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD
...
5
votes
3
answers
4k
views
How to detect current media type in CLI under Windows? (DVD-RW, BD-R, etc)
How to detect current media type in CLI under Windows? (DVD-RW, BD-R, etc)
I've tried with wmic cdrom get /format:list but no info about the current media type.
I want to detect if the disc is a CD, ...
0
votes
0
answers
77
views
How to establish VPN connection with two factor authentication from CLI
A VPN connection have to be established on demand from a bash script. GUI needed to enter two factor auth code. If you'll try to execute in terminal:
VPN_NAME=$(nmcli con|grep "VPN"|awk '{...
0
votes
1
answer
283
views
ssh from CL using keyfile from Windows client to Linux server
This sort of thing drives me crazy - hopefully obvious solution(s). Have keys on Win 10 laptop, and on one of my Linux servers. If I use puTTY, where I can explicitly browse to the keyfile on the ...
1
vote
2
answers
116
views
Get file system type in AIX
I want to fetch the file system types in AIX like NFS and all. du command shows just the file systems not their types. How can I do that?
0
votes
1
answer
2k
views
AWS EC2 How to install Windows Updates and Reboot computer remotely?
I want to run a command via AWS Run Command that downloads and installs windows updates on a remote Windows 2012 R2 Server instance running on EC2, and reboots the instance.
I tried suggestions on ...
0
votes
1
answer
363
views
How to set Wildfly/JBoss domain controller IP address in managed servers using CLI?
I'm trying to change the domain controller IP address in JBoss/Wildfly managed servers using the management cli, but the configuration either keeps unchanged or changes in the wrong way.
I can find ...
0
votes
0
answers
36
views
Can Wildfly/JBoss Management CLI with embedded host controller use a temporary local domain controller?
I need to use Wildfly/JBoss Management CLI to set up managed servers connections to the domain controller. It's under automation, so I'm using the Embedded Host Controller to avoid the hassle of ...
16
votes
2
answers
5k
views
What does the "@" sign mean in ls -l output?
I have this output on MacOSX:
$ ls -l
total 40
-rwxr-xr-x@ 1 levente staff 52 30 Sep 15:38 pl
-rwxr-xr-x 1 levente staff 675 14 Feb 17:07 plplay
-rwxr-xr-x@ 1 levente staff 662 26 Jan 14:13 ...
61
votes
7
answers
143k
views
Force SSH to use a specific shell
Is there any way to force SSH to use a particular shell on the remote end, regardless of what the user's default shell is?
I've tried solutions akin to:
ssh host.domain.com /bin/bash -c 'complicated,...
0
votes
0
answers
129
views
How can I fix this Mysql login?
I have installed MYSQL community edition on Windows server, I also added the Environment variable to execute the mysql command.
The scenario is: When I try to connect to mysql using the CMD I get the ...
38
votes
11
answers
182k
views
How to take ownership of files from the command line?
Every so often I run into a file that I need to take ownership of. I normally use cacls for changing ntfs permissions, but it doesn't seem to do ownership. Under *nix I would run something like ...
0
votes
1
answer
1k
views
How to check if a process is running or blocked on lock or I/O?
There are 2 instances of a script reported by ps.
How can I see in the command line if one of those (and which) is blocked on either I/O or on a file lock?
33
votes
3
answers
24k
views
Non-interactive creation of SSL certificate requests
Is there a way to create SSL cert requests by specifying all the required parameters on the initial command? I am writing a CLI-based web server control panel and I would like to avoid the use of ...
16
votes
3
answers
3k
views
Strange bash history behaviour when running multiple sessions
How is command line history stored when I use multiple terminal windows? I know it is stored in .bash_history but I can't see the logic on what history is used if I open new window.
It almost feels ...
16
votes
6
answers
93k
views
How do I convert wireshark capture files to text files?
How can I convert wirshark captures (.cap) files to text files or some format from which I can read the file and parse its contents ?
0
votes
1
answer
2k
views
Script to cleanup Windows.old remotely
Problem:
A lot of older workstations on our networks are running out of hard disk space and I am looking for ways to stream-line the process of cleaning up some space. I understand I can use Disk ...