Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [command]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
466 views

ping: Warning: time of day goes back (-203647us), taking countermeasures

I'm getting the below weird warning message sometimes when pinging to 8.8.8.8 (Occurrence is very low). Any idea about the root cause? $ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 ...
user avatar
  • 1,017
0 votes
1 answer
38 views

How to know in my network which computers have the local administrator account active

As the title says: How do I know in my network which computers have the local administrator account active? Because, as per security consultant request, we have to know, and if possible, disable, ...
user avatar
0 votes
0 answers
37 views

Permit all commandos on Tacacs+ Configuration

I have one question regarding TACACS+ Setup. Is there any way I cant permit all commands? Something like: cmd = * { permit .* } Thank you!
user avatar
0 votes
0 answers
278 views

Run Multiple Commands on Docker Container Startup on Synology NAS

Due to the way the existing folder permissions are structured via ACL I need to assign additional groups to the user inside several Docker containers I'm running. Unfortunately the containers by ...
user avatar
0 votes
1 answer
42 views

Linux cli pipeline command tail and grep

I am using tail to monitor a log file and using grep to filer the keyword. tail -F somefile.log | grep "keyword" is working tail -F somefile.log | awk '{print $4}' is working but if to put ...
user avatar
  • 103
1 vote
1 answer
95 views

Net User Command: Searching for list of users?

I am using this command net user joe.blogs /domain what syntax do I use to search 20 users? How to separate the names to make it search for the users?
user avatar
0 votes
1 answer
97 views

exec 2>&1 – execlude some command from being logged to file

I have the following in my bash script: # catch input for log-data exec > >(tee -i ${LOG}) exec 2>&1 I want to exclude one command from being written to this log file, but the following ...
user avatar
  • 43
0 votes
1 answer
83 views

I need to rename a file and insert a date

I'm trying to set a daily process to locate a file, rename it and insert the previous date in the file name. I want the file to be named "Filename_MMddyyyy.csv" with MMddyyyy being the ...
user avatar
4 votes
2 answers
920 views

Ansible command ignore creates

I use command module with creates on an ansible 2.9 role. However, sometimes I need to ignore the creates arg and re-run the command multiple times. Is there any way I can override the default ...
user avatar
  • 478
1 vote
0 answers
141 views

Open url with parameters with cmd

I changed default program for .docx and set to myopenwith.bat So when I clicked to any docx, it will open with myopenwith.bat myopenwith.bat has this code: start firefox https://www.dropbox.com/search/...
user avatar
0 votes
1 answer
106 views

How to restrict users switching from su command

How can I restrict users switching by su command? Suppose there are 3 users (root,user1 and user2) only root and user1 can switch by using su command. root or user1 should not be able to switch to ...
user avatar
1 vote
2 answers
162 views

How to use expect command with .run program in replace for yes command

The program.run I'm trying to run: Asks 2 questions that need the answer "y" Asks a third question at the end which is "press any key to exit" In addition, it doesn't have the &...
user avatar
  • 223
0 votes
1 answer
450 views

looking for an alternative to echo to write data to a file so it can be invoked via sudo

Background: when run on a unix box Tenable.io (nessus) will try to create a tag file in /etc/ with a unique string. Presumably so it can identify the machine if the hostname or IP changes. It does ...
user avatar
0 votes
2 answers
1k views

Azure App Service Plan - Specify App Size with PowerShell

I'm trying to deploy an app service plan (ASP) in the premium tier using powershell. I can deploy the ASP successfully but the ASP defaults to P2v1 which is not what I want. I need the ASP to be set ...
user avatar
  • 578
0 votes
0 answers
21 views

Is there a command to list all active maldet scans?

I relatively often run 2 or more scans on a server simultaneously (unfortunately some servers contain many users that manage to get their files infected simultaneously) and on many of those occasions ...
user avatar
0 votes
0 answers
15 views

Cronjob stopped working. But cron and php script still work? [duplicate]

I did a ImageMagick install on my CentOS webserver and afterwards my cronjobs do not work anymore. I have cronjobs that executes php files. For example one cronjob execute every 15 minutes a php file ...
user avatar
0 votes
0 answers
41 views

BAT script to return server licenses at shutdown?

My office uses program licenses that have to be manually activated and returned, and people tend to forget to do this when they go home for the day, resulting in most licenses tending to be ...
user avatar
0 votes
1 answer
213 views

Find out who hold the fd of one file which has been deleted?

Currently, I run a Java program will call some C++ library, and I find that after some files have been deleted, there still some thread holds the fd such as 3515991655 0 lr-x------ 1 user ...
user avatar
3 votes
2 answers
482 views

Delete all files & directories in a folder except one file

I want to delete all files & directories in a folder say 'A'. But except one file in that folder say .keep. I have tried the following command. find A ! -name '.keep' -type f -exec rm -f {} + ...
user avatar
0 votes
1 answer
3k views

Powershell send-mailmessage logs

I need to debug Send-MailMessage command. In linux, I can see the logs of sending mail, via tail -f. There is an option to see the logs of this command? I want to send mail to an external domain, it ...
user avatar
0 votes
1 answer
2k views

Java installation error on Debian 8

I followed the instructions from this website: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8 When I install jre and jdk it says: Reading package lists....
user avatar
0 votes
1 answer
54 views

Move one file in a folder to another folder and rename?? Cmd?

I am hoping to get some help with this, I am thinking of using Command Line to do the following: Move ONE file in a folder (that has hundreds of files) to a new folder (new folder is the folder this ...
user avatar
3 votes
1 answer
784 views

Windows Command - Delayed Expansion Syntax to Echo The VALUE of a Variable That Contains Another Number Variable

I am trying to echo the VALUE of a variable whose name contains another variable ($project!$project_number!_control) while using delayed expansion. I can't figure out the syntax to do this. Here's ...
user avatar
15 votes
2 answers
34k views

How to print the last line of a gz compressed file in the command line?

I have a lot of gz compressed log files which have generic names and I need to check the period of time they reflect. I know about the zcat | head but this works for the beginning of the file only. ...
user avatar
  • 299
2 votes
0 answers
266 views

Disable FTP commands on a per-user basis

I'm in the process of configuring an FTP server, using vsftp. I wish to have a couple different users. Some of these should only be able to read files, others should only be able to put files and some ...
user avatar
21 votes
1 answer
37k 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 ...
user avatar
  • 325
0 votes
1 answer
121 views

IFTTT segmentation fault [closed]

I'm doing an assignment for school using getop with ocelot, I have to count words and count the substrings in the document. I have the word counting working but I was not able to do the substring, I ...
user avatar
  • 103
2 votes
1 answer
346 views

fdisk with a a single command fail in the second execution

I ran a script to format a disk with fdisk like this: (echo n; echo p; echo $number_part; echo $firs_sector; echo $second_sector; echo t; echo $format; echo p; echo w) | fdisk /dev/$disk when i ...
user avatar
  • 135
0 votes
0 answers
512 views

Mail command in AWS EC2 ubuntu instance is sending emails to spam folder

Recently, i have upgraded my EC2 ubuntu instance from t2.micro to t2.medium in AWS to fight space related issues. Though the upgrade went well, mail command which was working fine in t2.micro started ...
user avatar
1 vote
1 answer
195 views

how to stop for loop on another tty

We are connecting to the same host via the same user. So, only our sessions/tty are different. If one of us starts a for loop such as:for i in *; do command $i; done, I don't know how to stop it. All ...
user avatar
2 votes
1 answer
258 views

get output of command execution in Rudder? [closed]

I'm trying to use a User Technique in Rudder to monitor if my nodes has pending package updates. I create a Technique that execute: /usr/bin/apt-get update && /usr/bin/apt-get list --...
user avatar
0 votes
1 answer
43 views

Linux Script command interpreting not working remotely

I have the below linux script(simplified): RUN_JAVA=$(which java) if [ -z $RUN_JAVA ] then echo "No Java found!" >> /tmp/output.txt else echo $RUN_JAVA >> /tmp/output.txt fi When I run ...
user avatar
  • 103
0 votes
0 answers
29 views

Can't use assigned variables after command

I have the following script filename="network_list.txt" while read -r line do name="$line" ping_stat=$(ping -c 4 $name 2>&1) if [ $? -ne 0 ] then echo "...
user avatar
  • 183
2 votes
1 answer
71 views

Disabling a CMD command for a User

Let's say there are two accounts on Windows, Admin and User. Im running a program which shutdowns system in some ammount of time (using shutdown /s /t). Is there any way to disable shutdown -a for a ...
user avatar
0 votes
1 answer
51 views

When I use uniq -u I get no outpput, but why?

When I run the following command, I expect to get the ip addresses of ASG member instances: current_servers=$(aws ec2 describe-instances --instance-ids $(aws autoscaling describe-auto-scaling-groups -...
user avatar
  • 10.3k
2 votes
3 answers
4k views

One liner to check if specific port(s) is/are open

Redis Quick Start states: Make sure the port Redis uses to listen for connections (by default 6379 and additionally 16379 if you run Redis in cluster mode, plus 26379 for Sentinel) is firewalled, ...
user avatar
-3 votes
1 answer
854 views

how to identify the last logged in user in Windows 7 / Windows 10

I am a user in a domain where there are lot of cloud machines available.Now the problem is these machines can be logged in by any people .Though I can restart these machines using the command shutdown ...
user avatar
0 votes
2 answers
3k views

WSManCredSSP setting cannot be enabled

Im trying to set up 2 Hyperv 2016 Server hosts on my local network for remote access, but I just cant get them going. Servers are configured properly - both running: PSRemoting (also tried -...
user avatar
  • 167
-1 votes
2 answers
2k views

Remove "Cc: " from mailx command

I have recently setup a mail server on my Ubuntu Desktop 16.10, and I made a script that when a specific user logs in, they will execute the script instead of bash. Here is the script: #!/bin/bash ...
user avatar
0 votes
1 answer
771 views

find command with type and max date age

Is there a find command flag where I can set a max date age for files. Example would be only files within the last 2 days Also, a command I was given was -type f what does -type f mean?
user avatar
2 votes
1 answer
2k views

Continuously tailing a rotating log file with date and time in filename

I have a log file in format log_name_YY-MM-DD_HH_mm.log. The log rotates every couple of hours and the new log is created containing the date and time of it's creation. Sometimes I need to tail the ...
user avatar
  • 305
1 vote
2 answers
5k views

How to cp files from sources to destination without using alias or non-alias and without getting confirmation/prompts?

$ cp /source/* /destination/ cp: overwrite `/destination/file1.conf` Aim is to copy files from source to destination without getting prompt or using non-alias(/) method.
user avatar
0 votes
0 answers
311 views

Remove com port using devcon for loop

I started learning command line yesterday. My supervisor asked me to delete extra com ports. I was trying to delete com port using command line. Right now I am using devcon.exe that is a part of ...
user avatar
  • 101
-3 votes
2 answers
137 views

Error executing help manual pages on Fedora 25 for all kind of man pages

[user1@testMachine ~]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:...
user avatar
  • 131
0 votes
3 answers
417 views

Enable confirmation for commands with force flag

Is there any option to enable confirmation for the rm -rf . We had an alias setup for rm=rm -i so whenever we delete a file it asks for confirmation but when -f flag is supplied it will not asks for ...
user avatar
  • 535
1 vote
0 answers
227 views

Windows Server 2012 Scheduled Task window title is taskeng.exe (but not always)

We have several scheduled tasks running console apps on a Windows Server 2012 machine. When many of these run, and the console command window appears, the window title is "taskeng.exe" but sometimes ...
user avatar
1 vote
1 answer
213 views

Setting IP that i have pinged to be a variable

I am having great difficulty with a batch file i am working with. With the update i received below, i use nslookup to return the IP of the address. Is it possible to extract the IP returned with the ...
user avatar
  • 21
-2 votes
2 answers
45 views

windows executable and extract data from file

On my CD-ROM I have this file: ip.txt which has the content: ip="192.168.1.1" netmask="255.255.255.0" gateway="123.456.789.2" How can I extract from ip.txt the IP, netmask and gw and use as command ...
user avatar
  • 1
3 votes
1 answer
4k views

Trouble using powershell output as a variable in batch file

I can manually run this command from a Windows Command Prompt: powershell (new-timespan -start 01/01/2000 -end (get-date)).days % 14 And it returns a number from 0 to 13. I want to use this result ...
user avatar
0 votes
1 answer
665 views

One vagrant command to create and provision machine whether machine is created or not?

When my VM is not created, I can run: vagrant up or: vagrant up --provision but not vagrant provision, because of the warning: VM not created. Moving on... When my VM is created, I can run: ...
user avatar
  • 5,797