Command Line interface (CLI)

learn more… | top users | synonyms (2)

0
votes
2answers
2k views

How to run multiple commands with psexec? [duplicate]

I need to run a command to uninstall forefront on some of our workstations and am having a bit of trouble formatting the command. Here's what needs to happen (in multiple commands) xcopy ...
1
vote
1answer
2k views

Fork a process inside a bash shell script

I've a simple shell script like #!/bin/bash sh -c "sleep 60" & exec sleep 120 In using the pstree command, I found something like `-sleep(11681)---sleep(11682) The first sleep is due to the ...
0
votes
0answers
344 views

setting up dell compellent array from command line

So we have a few compellent storage arrays. I have little knowledge of these things but I am improving. so my basic question is I want to configure the server via cli and make some script which does ...
2
votes
2answers
366 views

Batch rename directories with regex via command line on Linux

I have a folder on the server that contains directories that are created daily and are named by date, like so: 07-06-14 08-06-14 09-06-14 etc. At some point I decided that a preferred naming would ...
1
vote
5answers
154 views

How to split the output into different files?

I have a input file like foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz bar xxx yyy zzz bar xxx yyy zzz foo xxx yyy zzz .. How to split the input file by line, into foo.txt ...
0
votes
1answer
374 views

Turn Linux into Router (Cisco-like) [closed]

how you doing? I have two Sophos UTM 220 Appliance for study. They have 8 Gigabit Ethernet ports and the hardware is like a common PC (Intel Motherboard, Processor and DDR2 Memory). I would like to ...
1
vote
2answers
89 views

Rsync plugin to many local wordpress installs via script or cli

I am maintaining a large number of wordpress installs on a production server, and we are looking to deploy InfiniteWP for managing these installs. I am looking for a way to script the distribution of ...
0
votes
2answers
3k views

Launch firefox on remote server using SSH with a command line parameter

Is there a way to launch firefox on a remote server using SSH this way ? : ssh username@ip_address [command line] When I run: ssh username@ip_address -Y (or -X) firefox (I want to launch firefox ...
4
votes
3answers
876 views

How can I create a windows shutdown script from powershell/command-line?

I've read the TechNet pages that describe using computer/user startup/shutdown scripts, and that's great, but I'd like to create those scripts via the command-line (and not have to click around in ...
2
votes
3answers
595 views

How to split a file and compress directly?

I've a 100GB file and I want to split into 100 of 1GB file each (by line break) e.g. split --bytes=1024M /path/to/input /path/to/output For the 100 files generated, I want to apply gzip/zip to ...
3
votes
2answers
1k views

SCCM - Where to put the create user step

I've implemented SCCM on our server and am now running task sequences to migrate from Windows XP to Win7. But we also need to be able to add a new local admin, because disable the default ...
22
votes
8answers
6k views

How to hide a password passed as command line argument?

I'm running a software daemon that requires for certain actions to enter a passphrase to unlock some features which looks for example like that: $ darkcoind masternode start <mypassphrase> ...
-2
votes
1answer
240 views

How to install ganglia on vmware esxi 5.5 host? [closed]

I want to install ganglia monitoring tool on esxi host so that i can monitor vm's usage. Can anyone give me a installation guide/link which i can refer/follow to install it? PS: I am total newbie to ...
-3
votes
1answer
155 views

How to copy a file with its parent directories on Windows?

I want to do this on Windows command line: copy foo\bar\baz\myfile.txt c:\destination And end up with: (assuming c:\destination existed but was empty) c:\destination\foo\bar\baz\myfile.txt How ...
1
vote
1answer
173 views

Command line tool for fetching and analyzing SSL certificate

Following the heartbleed vulnerability in openSSL, all the SSH certificate on our servers were re-issued and re-installed. Since it is likely that we've missed something on a server (for example, ...
0
votes
1answer
68 views

Change VNC password without losing the session

I have a VNC session to my server(linux), but now i need to change their password, however, i cannot lose that session. If I use this command: vncpasswd [passwd-file] Does anyone know if I will ...
2
votes
1answer
152 views

Windows 2008 Server R2 Command Prompt/Power Shell Slow Scrolling

I'm having an issue with various Windows 2008 Server R2 machines scrolling very slowly using the command line or Power Shell. For instance, if I type "dir", I see my contents being displayed 1 line at ...
0
votes
0answers
44 views

Is there a simple command to delete multiple ip sla policies?

I have a Cisco 819 router and on it there are a lot of ip sla policies. when I run the sh runcommand I get the following; ip sla auto discovery ip sla 2 http get http://www.facebook.com cache ...
0
votes
2answers
98 views

How do I see if user connected to mysql over ssh tunnel?

I imagined command last, would also give me mysql over ssh tunnels list. But I was wrong. Is there a place where this tunnels are logged? Ubuntu server 12.04.
0
votes
1answer
220 views

Cannot add address object using CLI on Sonicwall NSA2400 (5.9 firmware)

Based on an example from "SonicOS 5.9 Enterprise Command Line Interface Reference Guide" I have tried to add an address object using command below (which is not changed compare to prior firmware): ...
1
vote
3answers
563 views

Generate CPU, memory, disk and network graphs from command-line [closed]

I would like to periodically (e.g. using cron) generate an image (e.g. png) containing graphs for CPU usage, memory usage, disk I/O load and network usage. I would like something not too ugly, so a ...
10
votes
2answers
2k views

linux command to prevent dos attack by using netstat and iptables

I want to DROP more than 200 requests per ip to prevent ddos attack. this is command that i used to detect requests count per ip : netstat -alpn | grep :80 | awk '{print $5}' |awk -F: '{print ...
1
vote
1answer
64 views

Google Analytics real-time data into a 'top' like CLI

Does anyone know of a project or set of scripts that attempts to bring Google Analytics data to the command line? What I dream about is a "top" like application that lets me monitor Google Analytics ...
1
vote
1answer
113 views

How to read CPU usage statistics shown in “top” screen?

I'm pretty confused about understanding of CPU usage in a linux server... Please see the screenshot below: WHAT does Cpu(s): 9.1%us mean ACTUALLY? and WHAT does 74.7 at the ruby/deployer row ...
4
votes
3answers
367 views

How do I remove (un-apply) a named filter from a Procurve switch port using the CLI?

EDIT: Edited my examples to reflect that I was indeed attempting this with the switch in "configure" mode. Still no joy. EDIT: I've done some more searching on this issue. I just can't seem to see it ...
0
votes
1answer
67 views

Batch file output issue

I am trying to get a batch file to output some data to a CSV file. The command I have works perfectly in the command line but not when I copy it to a batch file. In the batch file, it just hangs and ...
1
vote
2answers
1k views

Openssl Custom Extension

I know how to create x509 certificates with the openssl command line. But now I want to create one with a custom extension. How can I do this with openssl command line?
2
votes
1answer
2k views

opening sar activity files error “Invalid system activity file”

Note: I opened this question on Stackoverflow first and realized that this is the right place for the question. Just stating that it is not a duplicate, already closed the question on SO. I am new ...
0
votes
1answer
45 views

mysql cli indentation issue

I've got some really weird output from an sql query: mysql> select concat('abcdef', license_code, 'c') from fulfillment_licenses_list limit 1; +-------------------------------------+ | ...
3
votes
1answer
620 views

Defrag options in Windows Server 2012

I am looking at the command line options for defrag.exe as well as the "ScheduledDefrag" task on Windows Server 2012, and I don't understand some of the arguments. In particular, when I view defrag ...
-1
votes
2answers
96 views

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility ...
0
votes
2answers
171 views

How do you create separate config files for mod_php on apache and command line php?

I'm looking at the ubuntu sets up php for both apache (mod_php) and php cli. They have one configuration ini in /etc/php5/apache2/php.ini which contains settings for apache+php and another ...
0
votes
1answer
18 views

disabling extra message after changing to new directory

Whenever directory is changed, it is displaying the new directory name: # cd /home/ Directory: /home/ # cd ~ Directory: /root How to disable it? We are logging into csh. We already verified ...
3
votes
2answers
114 views

Tracking progress with xargs

I'm using xargs to execute a command on a set of input parameters something like this: cat <someinput> | xargs -n 1 -P 5 <somecmd> The input file is really long and take a long time to ...
0
votes
2answers
165 views

Graceful way to rsync millions of files between two local folders

I want to rsync a folder with millions of files from a local directory to another, on a daily basis. The files themselves change very rarely. I want to reduce the impact on the running server, e.g. ...
-2
votes
3answers
54 views

Put another hdd in ubuntu server 10 [closed]

I am using Ubuntu server 10 for LAMP and hosting sites. I installed the server without a GUI, and what I want to do is to add a second HDD for some backup. I attached the HDD but the problem is I ...
0
votes
0answers
19 views

CLI modify-user with add-mysql returning “A db login with same name already exists”

I am trying to give an existing user access to a newly created database via virtualmin via CLI. This what I am using: virtualmin modify-user --domain mydomain.com --user existingusername --add-mysql ...
1
vote
1answer
79 views

Bash: delete old files except one

I am using the following command to delete old backup files: find backups/ -name "bak_*.tbz" -mmin +4800 -exec rm -vf {} \; The problem: When there are no new files, than all files are deleted. I ...
0
votes
3answers
843 views

deny local logon for a new user through command line windows server 2008

I am creating a local user account that I want to be able to connect over ftp, but not log on to the server, I believe the way to do this is to deny local logon but am unsure how to achieve this via ...
1
vote
1answer
105 views

command to add permissions to a folder for a local user in windows server 2008

as part of an installer I need to create a user with limited permissions to add the user I will use net user "<username>" <password> /add /fullname:"<username>" I now need to ...
-6
votes
1answer
524 views

How to undo rm -rf? [closed]

How we can undo rm -rf command ? For example, I have Application folder. And I have remove it by rm -rf Application But it was my mistake and want to recovery or want that Application Folder. But ...
0
votes
1answer
780 views

php -i executed from command line and phpinfo executed from browser show different php parameters

My problem is that when I execute php -i it shows the php version as php 5.4 and the loaded config file as /usr/local/lib/php.ini. When I execute the script phpinfo.php from the command line it shows ...
0
votes
3answers
117 views

efficient, simple ‘lazy’ differential FTP upload tool? (i.e. for web dev workflows) [closed]

I am looking (over some time now and with some despair) for a tool, I guess most web developers need: A fast, ‘lazy’ aka ‘differential’ FTP upload tool. To quickly upload (without much server-side ...
0
votes
0answers
176 views

Output results of findstr at a Batch file so they can be read by PHP

I have this Batch file which looks for a string through a the files in the current folder: @echo off for /f %%i in ("*") do ( findstr /m /C:color "%%i" ) Now I would like to output the ...
0
votes
1answer
50 views

How to restrict a Linux program's permissions

I'm running a native linux program from PHP using shell_exec. Specifically, calling antiword to extract text from Microsoft Word files users uploaded. However, as I've got no way of assessing ...
1
vote
2answers
194 views

How to directly query authoritative DNS nameserver from command line, bypassing cached servers? [closed]

How can I directly query authoritative DNS nameserver from Linux and Mac OS X command line, bypassing cached servers? This is helpful when wanting to immediately verify newly-created DNS host names ...
2
votes
1answer
52 views

Command Line Script Issue

I've been working on a batchfile script for a few weeks now that should automate certain routine tasks I need to perform during my work. However, I've stumbled upon a problem which I haven't been able ...
1
vote
1answer
72 views

How do I pull up a command prompt on an Azure Website instance?

I am running an instance of the Ghost blogging platform on Azure. Setting it up was simple, I used a template from the gallery and it was set up in no time. FTP'ing into it to do work like template ...
0
votes
1answer
465 views

Linux empty buffer cache command permission denied

I'm using the following commands to flush cache: # sync; echo 3 > /proc/sys/vm/drop_caches # sync; echo 2 > /proc/sys/vm/drop_caches # sync; echo 1 > /proc/sys/vm/drop_caches When I use ...
1
vote
2answers
169 views

Why is DU causing high CPU usage?

On CentOS 6.5, du -sk /home and sh -c (du -sk \/home) 2>/dev/null run because a scheduled disk usage for /home, but du is causing 100% CPU usage. Plus, before it's even finished, another du gets ...