Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
vote
1answer
20 views

write/wall message to users with color

Is it possible to send messages to other users (i.e. via the wall and/or write commands), with colors in the message? I have a shutdown script that kicks other users off of a shared file server, and I ...
0
votes
1answer
20 views

How to enable dig to show status codes?

With default options dig shows the return status for a DNS query in the comment ;; ->>HEADER<<- ... status: NXDOMAIN: ubuntu:~$ dig hosted-by.myinternetservices.com. ; <<>> ...
0
votes
1answer
20 views

Lint PHP and only return errors

I'd like to use php -l to only return errors and not No syntax errors detected messages. Is this possible?
0
votes
1answer
32 views

How to get performance metrics for a VM in azure with power-shell and cli

Am getting an error while running cli cmd " access denied". az monitor metrics list --resource /subscriptions/xxx/resourceGroups/yyy/providers/Micros‌​ oft.Compute/virtualM‌​achines/TestVM ...
-2
votes
1answer
31 views

Random Sleep in Crontab/Terminal [duplicate]

I want in terminal or in crontab(both) be able to put a random time. Something like Sleep $(1-300) pkill screen && ./start just a random simple example
0
votes
0answers
23 views

linux remote control application

I have a question for you. I have a scenario where i have 2 servers A and B server A can only communicate to server B over port 80\443 with HTTP headers (there is a deep packet inspection active on ...
28
votes
5answers
3k views

Best way to remove shutdown command, but keep reboot

I have a raspi type device in a data center, and recently accidentally fat fingered and pasted a shutdown command into the wrong terminal on my screen. Is there a way to keep shutdown -r but remove #...
0
votes
1answer
50 views

Saving PID in nohup output

I want to save the PID of a nohup process as part of the name of nohup's generated output file. This is going in the right direction, but only works if the process with it's ID is already settled, i....
2
votes
0answers
70 views

Stopping a windows service via command line, where the service has symbols in it

For whatever reason the company who installed this service used the same name for the display and the service name. Which is this format (not exact wording to protect them) "Blah® Blah™ Agent ...
2
votes
1answer
470 views

Return only a HTTP status code from curl command

I want to just get a statusCode from CURL command response. When I use this command: curl -I http://uploadserver.ln/1.mp4 I want to just get 200 rather than this long result: HTTP/1.1 200 OK ...
0
votes
0answers
38 views

How to get list of openstack Instances with Project name

My openstack setup is Mitaka version. I want to list all the Instances with Project Name. I tried with below command but it shows Tenant ID but not name. nova list --all-tenants
0
votes
0answers
63 views

Sonicwall modify access rule destination via cli

This is the first time I access a Sonicwall thru cli. Someone has modify the source of the http/https management so now, there is no way to access it via the gui, only via ssl. Could someone tell ...
0
votes
1answer
481 views

EMC VNX 5300 - How to access Control Station

We have an EMC VNX 5300 and the certificate has expired. I have already researched the instructions for viewing the certificate and regenerating a new one. The steps require accessing the Control ...
-1
votes
1answer
25 views

Get client time on Apache server

I actually have two questions: 1) The timestamp in Apache error.log file is client's time or the server's? 2) If I connect to the server via command line and execute the command HEAD / HTTP/1.0, ...
0
votes
0answers
107 views

Windows Defender Command line not finding updates

I try to update Windows Defender with the command line utility. "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate The result is Signature update started . . . Signature update ...
1
vote
0answers
108 views

scp - What do the “-d” and “-t” options do?

I ran into this post that suggests adding the following to .ssh/authorized_keys in order to force an scp command : no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="scp -v -r -...
0
votes
2answers
105 views

Assign folders privilidges for App Pool Identity (CLI Only)

I have a site running on IIS 10 in the default app pool. I need to give permissions for it to read to a folder tree in a (Windows) docker container. How, using the CLI only, can I determine what ...
1
vote
0answers
22 views

How do I set up multiple unique accounts via command line?

I have to setup and configure about 60 (+ more in the future) windows 7 embedded PC's with the same settings. Each of these PC's will have 12 accounts on them. Each of the accounts will have their own ...
0
votes
0answers
42 views

linux sh -c replace echo not working

This seems like it should have a super simple answer, but I have search for a while and tried different suggestions to no avail. As an example, I am trying to create a function that will be available ...
2
votes
1answer
154 views

cannot send long path filename (UNC path) to printer

i'm using long path names with UNC (UNI), for example: \\?\c:\tmp......\file1.prn but when i try to send the file to a printer on windows command-line, for example with copy/print command, it ...
-1
votes
1answer
314 views

Powershell remote access denied on workgroup

I've configured a domenstic network with PCs running windows 10 and I'm trying to set up remote access via powershell between these hosts. I've enabled remote access on all the hosts, authorizing all ...
0
votes
0answers
1k views

How to list active directory groups in linux for a given user, one per line, knowing that some group name contain a space character

When using "groups" or "id -Gn", I end up with the typical space-delimited list of all groups for the current user. These commands run on the assumption that group names cannot contain a space ...
1
vote
0answers
105 views

Does Bash through Linux as a Subsystem for Win10 replace Git Bash for Windows?

I'm in the process of learning how to create Wordpress templates, and as a part of that was told to install Git, npm, node and gulp. However, the online course leaves out details about where stuff ...
1
vote
5answers
120 views

Is there a secure way to run multiple MySQL CLI commands without having to keep asking the user for a password?

I have a bash script that runs a bunch of MySQL commands, separated by user input. Each time a query is run, the password must be re-entered. I understand it's best to avoid putting the password on ...
0
votes
1answer
254 views

asterisk playback sound when someone answers

This is an asterisk CLI question. I want to be able to play a sound byte with the asterisk "originate" command, but only when someone answers, like: channel originate *insertoutboundlinehere* ...
0
votes
1answer
35 views

Add a user to a domain group and set the user privileges to certain folder Win10

I have a user in my workplace domain, I want to add him to a specific domain group then assign him some privileges on a specific folder. I wonder how this can be done using command line or a more ...
1
vote
1answer
276 views

Configuring a DELL storage array with both controllers set to the same address

I've gotten hold of a used Dell PowerVault MD1000 with two MD3000i (aka AMP01) controllers, both of which are configured to the same address. However my attempts to configure them - or indeed perform ...
1
vote
1answer
74 views

Is there a way to get the plugin output of icinga2 on the commandline?

With icinga2 one can use icingacli monitoring list to get the monitoring results on the commandline. I'm looking for the detailed output of the plugins/services (shown in icinga2 as 'plugin output', ...
0
votes
0answers
57 views

How do you use the message of an optarg in zsh completion?

In the zsh completion docs there is an optarg 'message' Each optarg following an optspec must take one of the following forms: :message:action ::message:action An argument to the ...
0
votes
2answers
50 views

How to make nginx return error on demand without changing configuration

I'd like to have nginx reverse proxy return 502 on demand if I have emergency task that requires my upstream service to be running, yet users shouldn't connect to it and nginx should indicate "server ...
-2
votes
4answers
105 views

Azure VM's Accessing/Managing

I am aiming to be able to access and manage VM's in Azure. The aim is so me to log in (az login) through the CLI into my own account and be granted full access and privileges to another subscription ...
0
votes
1answer
322 views

Where and how to install waagent (Linux VM Agent) via CLI?

I am creating a VM from disk in azure from CLI. The VM gets created successfully, but in the properties, it shows VM agent unavailable. Because of which I am unable to ssh to the VM. I am creating VM ...
0
votes
0answers
15 views

how to clear AEN list on 3ware escalade controller using command line

Anyone know how to remove / clear the AEN list from the command line utility (tw_cli.exe) ? I can view the AEN list using /c0 show AENs, but there seems to be no way to remove these errors even after ...
0
votes
2answers
55 views

Does it matter which order options are entered when using the command line?

Question: Does it matter which order options are entered when using the command line? The following example comes from CentOS. Would these two commands produce the same result? sudo yum update -y ...
0
votes
2answers
140 views

Bash script shows error for “pwd”, simple script

I'm trying to make a Bash shell script but it is not working. Here is the contents of the script: #!/bin/bash pwd I would expect this to print out the current directory. Instaed, it prints this: ...
0
votes
1answer
77 views

grep multiple occurrences with intervening lines

I'd like to do the following: Given a file with many lines, several of which match a pattern, output the first matching line, the last matching line, and all the lines in between (I want them in ...
4
votes
2answers
2k views

Kubernetes - how to map docker run command-line parameters to kubectl command line

I need to run this Docker command in Kubernetes: docker run -p 8080:8080 sagemath/sagemath sage -notebook I can map everything across except "-notebook" - does anyone know how to do that? Here is ...
-1
votes
1answer
64 views

What is the os.uname prompt on ESXi [closed]

I want to check with a python script if my system runs on an ESXi but I have never worked with one. My script should only work on ESXi but I have no clue what the cli prompt would look like or how to ...
0
votes
2answers
115 views

Sed command to replace code in every files

sed -ri '1 s/.*<\?php \$xgzdxgn.*\$tdjwdrzy.*\$vbtpmtzqq-1; \?>//g' *.php How to run this command on folders and sub-folders in a single command ( for all php files ). when i try to use this ...
0
votes
0answers
46 views

| date +'%b %d %T %Y' will return a current date

I'm trying to re-format a date: $ openssl x509 -enddate -noout -in cert.pem notAfter=Jan 30 02:19:17 2018 GMT But: $ openssl x509 -enddate -noout -in cert.pem | date +'%b %d %T %Y' Dec 26 11:25:...
0
votes
1answer
79 views

ProxmoxVE unable to login from Server native CLI

Something Odd just started happening with one of our development server Nodes. Suddenly I'm not able to login as "root" from the ProxmoxVE (5.0-30) from the native CLI. The funny thing is that we can ...
0
votes
1answer
99 views

azure CLI 2.0 az webapp log tail cannot find the 'NAME' of my webapp

When i was using the Azure CLI 1.0, i use the following command to log tail my webapp: azure login azure site log tail MY_WEBAPP_NAME Now after i have switched to Azure CLI 2.0, i cannot find the ...
1
vote
2answers
625 views

How do I get the PID of a conhost process associated with the batch file and cmd process that created it?

Say I have several conhost processes that happen to be running already. Now I run a batch file, which starts a cmd process which, in turn, causes another conhost process to open up. From within the ...
-3
votes
1answer
57 views

Recursively removing the content of a directory but not a directory itself [duplicate]

I have a directory which contains other directories and files of unknown depth. How can I delete only the content of the directory -- nested directories and files -- but not directory itself? I've ...
0
votes
1answer
248 views

How do I hide the shell_exec() output from the user when running PHP script from SSH?

I have a PHP script that automatically downloads Nginx and setups my web server. It does actions such as: create Nginx configuration files, generate SSL certificates, among other amazing functions. It ...
1
vote
1answer
461 views

Get Azure VM Overview / Monitoring data via powershell or azure cli

When we login to azure portal and have a look at any resource like VM, we will see some monitoring data in Overview section of each resource which shows us charts for 30 days. (CPU average, network in/...
0
votes
2answers
1k views

Create nohup.out file based on date

I am using nohup command to run a java web server application. This is the command i am using: nohup java -jar WEB-SNAPSHOT.jar & This command will create a nohup.out and my server logs are ...
0
votes
1answer
295 views

SCAP compliance checker 4.2 silent install switch not working

I am attempting to silently install SCAP compliance checker 4.2 for Windows. SCAP is found here: https://iase.disa.mil/stigs/scap/Pages/index.aspx Based on the documentation, I use the /S switch but ...
1
vote
1answer
179 views

Sendmail is not working in PHP 7.1 CLI (SSH)

I have opened a tmux screen and started my newsletter. It uses the mail() php function in order to send the emails to 500,000 destinations. It should take normally no more than a day to do so. ...
2
votes
2answers
1k views

showmount -e nfs_server_hostname does not show all the available mounts for a client, but why?

NFS_Server is a DataDomain Client is RHEL 7.3 I run a below command to show available NFS shared for my client system from NFS_server, however, I do not see all the share available to mount. # ...