Command Line interface (CLI)

learn more… | top users | synonyms (2)

1
vote
2answers
217 views

Command line - query account type (local, network managed, mobile)

How can I query account type information. Things like who and users don't show this. Also tried things like dscacheutil -q user I'd like to know if a users account is a mobile account and I am doing ...
1
vote
3answers
9k views

Is there a built-in command-line tool under Windows like wget/curl?

I come from a Linux/Unix background and I have been wondering if Windows has a binary that can download files from the console. I would like to automate a certain process and one of my requirements ...
1
vote
1answer
34 views

How do I find out the current remaining lifetime of my AFS tokens?

I can use klog to renew my AFS token, but I am wondering whether there is an equivalent command to view the remaining lifetime of my AFS token.
2
votes
2answers
429 views

Is there any way to convert a putty “All session output” log, with control characters, to a more human readable “Printable output” log?

We had a contractor in-house to help with some configuration of a product and we're trying to look through the putty logs he set up for us, but instead of using "printable output" he used "all session ...
1
vote
1answer
623 views

ntpdate and firewall: no server suitable for synchronization found

I'm behind a firewall and only have access to ports 80 and port 443. How can I sync my system's clock? Here's the command I issue: sudo ntpdate -u 1.debian.pool.ntp.org But I keep getting the ...
0
votes
1answer
71 views

How to check top processes?

I'm look for shell script to send Top processes as an email when Monitor CPU load average exceed 20 I'm running RedHat 6.
12
votes
2answers
489 views

backslash at the beginning of a command

In Installing RVM manual I see a lot of lines starting with '\': Install RVM with ruby: $ \curl -L https://get.rvm.io | bash -s stable --ruby I'd think it is just mistype but they repeat ...
-3
votes
2answers
154 views

How can I count the number of lines matching a pattern returned from a linux command

How can I count the number of lines matching a pattern returned from a linux command I want the number of lines returned beginning with 'foo' , so if I pipe the output to grep will this ...
0
votes
1answer
65 views

single or set of patches from windows update?

Is there a way to install several patches by kb or other means and only install those specific without manually downloading the patches? I want to use automatic update services but don't want every ...
0
votes
1answer
289 views

How to scan only last 24 hours files with clamav

I've create a bash script to scan whole server for virus via clamav. The script has been running via cron every night. Because of this I want to scan only the files that has been added last 24 hours. ...
-1
votes
2answers
94 views

Consecutive Remote Rsync Commands (Purpose Defeated by Multiple Password Prompts)

I have two huge folders that I want to rsync one after the other using one command. Command 1: rsync --compress /home/user/folder/ user@192.168.1.10:/home/user/a/folder Command 2: rsync ...
0
votes
1answer
103 views

Differential backup missing moved folders (flawed archive attribute logic)

Recently I've discovered that my backup system it flawed: there are situation where various files/folders are missed. I do my backup from local disk to a network NAS. I use Cobian backup, and I have ...
0
votes
2answers
416 views

special characters in http_proxy environment variable

What is the correct format using special characters in http_proxy environment variable? Or to be mor specific, what to do with special characters in username or password when authenticate to http ...
-2
votes
2answers
576 views

How to make differential backup without using archive attribute? [closed]

Plain and simple: I need to make differential backup of my files without using the typical file attribute logic. Possibly with a free software. So the software I need should rely on it's own indexing ...
1
vote
1answer
316 views

net use password limitations

I'm trying to mount a network folder in a script using net use, and I keep getting a bad password error. I'm using the following syntax: use \\server\share password /User:serviceaccount Doing it ...
15
votes
4answers
5k views

What's a secure alternative to using a MySQL password on the command line?

We have a PHP command-line script to version a database. We run this script whenever a developer has added a new database patch. The script runs the patch with the MySQL command-line: system('mysql ...
3
votes
2answers
284 views

How can I find my public ip address with built in system commands without relying on any third party websites or services? [closed]

Are there any built in system commands such as ping that let me discover my public ip-address either on a Windows or Linux operating system? This should not rely on any third party websites or ...
0
votes
1answer
301 views

s3cmd put only files that do not exist in destination bucket

I've been using s3cmd to sync local files on our server with the S3 bucket. There are over 200,000 files on the local server. Can't seem to find any documentation on the site that explains how to ...
1
vote
1answer
465 views

How to enable SMTP server in Windows Server 2012

We are using servermanager.exe to install smtp server in windows 2008R2 from comand prompt. Is there any alternate to servermanager.exe? How to enable smtp server in windows 2012 from command prompt? ...
0
votes
1answer
131 views

How can you send mime encoded emails on systems that do only support uuencode

If you use e.g. Solaris without additional installed software to send MIME mails: how can you send mails with MIME attachments with standard command line tools?
-3
votes
3answers
2k views

How to find files of certain extension and tar each of them in to another location

I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain ...
1
vote
1answer
498 views

Pentaho Windows Batch file not running when executed on Windows Server 2008

I'm running a Pentaho Kettle Kitchen batch scripts on Windows Server 2008. When I launch the batch file, the Windows Command prompt pops up and then disappears. I've changed all files in the folders ...
1
vote
1answer
79 views

FOR works at prompt, but not in script file?

As part of a task that I am working on for a customer, I need to make some modifications to the enterprise logon script. Windows command-line is definitely not my area of expertise, but I am doing OK ...
2
votes
1answer
2k views

How to Extract command-line output into a Variable?

As part of a task that I am working on for a customer, I need to make some modifications to the enterprise logon script. Windows command-line is definitely not my area of expertise, but I am doing OK ...
1
vote
2answers
489 views

How can you add a command line test to Jenkins that reads the exit code?

I want to add a command line script to Jenkins as part of the build process. This command line script will exit with an error code of 0 if things where successful or 666 if it fails. I wish to stop ...
3
votes
1answer
276 views

How can I determine valid Mac OS X Server `serveradmin` commands?

I've used Mac OS X Server's serveradmin command line interface for Server Admin.app & now Server.app for starting & stopping services, viewing status & settings, and occasionally running ...
5
votes
2answers
3k views

Windows: How do I add a program to the system's path environmental variable from the command line?

I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a ...
0
votes
1answer
198 views

Path not loaded for user when connecting with SSH

I have an Windows 2008 Server Instance running on EC2. I have installed an application and added it to the path and it is now available to my Administrator user from the Command Line. However, when I ...
0
votes
1answer
157 views

How to combine outputs of ps and lsof

Usually output of ps has a pid somewhere. Is there a way to combine this, preferably with a one-liner, with an output of lsof ? e.g. 27915 ? Ss 0:03 gpg-agent --daemon gpg-agent 27915 ...
2
votes
1answer
1k views

How to retrieve the current Windows NLA network location from command-line?

We have a Windows Server 2008 R2 domain controller which always sets its NLA location to 'Network 3' after a reboot. Without fail, this defaults to Public, which screws with my Domain profile ...
3
votes
3answers
4k views

changing colors of files/dirs in linux ls

I use putty with a black background and was wondering if there was or is a way to change the colors of the dirs which are dark blue. i noticed DIR_COLORS.xterm and DIR_COLORS do they play this role? ...
91
votes
5answers
4k views

How to cd into a directory with this name “-2” (starting with the hyphen)?

I have a directory named: -2 I want to cd into it but the cd complains: bash: cd: -2: invalid option With no success, I've tried: cd "-2" cd '-2' cd \-2 Any solution? Edit: no file browsers ...
-3
votes
3answers
3k views

How to safely kick out other users logged in as root?

I tried this: pkill -KILL -u root It turns out that wasn't what I wanted. Now I can't log in by SSH. What is the correct way? Edit - I've added the word "safely" to the question. I know that you ...
0
votes
1answer
64 views

How to access running application's internal CLI?

I'm running a java application (on Ubuntu) with its own internal CLI but no API or access from outside. One solution I can think of is running this application in its own pseudoterminal and then ...
5
votes
3answers
5k views

How to clear Windows event logs using command line?

Normally I can open the Computer Management console, go to the Event Viewer snap-in, open the Windows Logs folder, right-click on Application/Security/Setup/System subfolder, choose Clear Log and ...
5
votes
1answer
281 views

Identify which process is responsible for heavy disk i/o under FreeBSD

I wonder how I can monitor which process takes out all my IO bandwith. The only command i know is gstat but it shows cumulative info. Is there any tools i can use to inspect the running processes for ...
1
vote
2answers
220 views

Set up linux with both GUI and CLI

I want to know if it's possible to install ubuntu server (if there is an other Linux distribution that solves this I'm open to suggestion) with both GUI and CLI so that i can choose to boot it with ...
1
vote
1answer
47 views

Scheduled capture from COM port

I want to capture COM output to a daily file. I can capture manually, using something like RS232 Data Logger, but I want to run a scheduled task so I get a daily log of the data captured. Is there ...
12
votes
2answers
176 views

Sun Grid Engine huhohshdhjha

when I type qstat -h, I get the following option [-s {p|r|s|z|hu|ho|hs|hd|hj|ha|h|a}] show pending, running, suspended, zombie jobs, jobs with a ...
-1
votes
2answers
234 views

How do I copy files between harddrives on Ubuntu CLI? [closed]

I have a dedicated server with a 120gb main ssd. The server happens to come with a couple of 3000GB hard drives. I'd like to use them to back up my main drive. Preferably, I'd like one as an exact ...
-1
votes
2answers
90 views

Find Hostname by having IP-Address

Is there a way to find out hostnames only by having the IP's of the hosts, while only using Windows' command line (cmd)?
2
votes
1answer
116 views

How can I calculate the total size of an extremely large number of files with a particular extension?

I've got a directory in Linux that contains a large number of files (tens of thousands), plus directories that may contain thousands of files as well. At some point the following du command fails ...
1
vote
1answer
54 views

Can I use the CLI to reset an IP address from a different subnet?

I'm working with a small office network which has fifteen devices on 192.168.2.x. They want to add a print server to the network. Simple enough, except that the print server seems to think it's ...
3
votes
1answer
347 views

Save output and exit code of command to files on windows

I want to run a command and save its output and its exit code, in different files. Here's what i am doing: cmd.exe /C command 1> %TEMP%\output.log 2> %TEMP%\error.log && echo ...
0
votes
2answers
667 views

How to stop freeswitch by the command line?

freeswitch has it's own CLI and it is possible to shut it down with shutdown command issued within this CLI. But is it possible to shut it down bu separate command, for example, by shell script?
1
vote
4answers
2k views

How to configure PHP CLI on linux ubuntu to run as www-data?

I have a symfony2 application on my ubuntu. Symfony has a plenty of useful console commands (like php app/console cache:clear or php app/console assets:install web). The problem is If I run them as ...
-3
votes
1answer
49 views

trying to find domain name in VM [closed]

I requested helpdesk my VM computer name to be added to the domain. after I run the SystemInfo command in the command line, I get WORKGROUP instead of the desired domain name. Help desk insist that ...
0
votes
1answer
476 views

Cisco AP, how to show dot11 wpa handshake timeout?

Please help me with a newbie question regarding Cisco AP CLI . According to this Cisco doc , I know how to change WPA handshake timeout value to 2000 milliseconds. Cisco1242AG-1(config)#dot11 wpa ...
0
votes
2answers
723 views

What is the Cisco iOS (CLI) command to display a WAP's Radio MAC address?

I can't believe I'm unable to find this with teh g00glez or by RTFMing, but does anyone know how to display the MAC address of a Cisco WAP's Radio (wifi connection) from the command line? show ...
0
votes
2answers
140 views

broke pipe when creating file system

I want to ask help on how to solve my problem broken pipe when creating the file system through ssh. Here is the result when I issue the create filesystem command in ssh. [root@6~]# mkfs -t ext3 ...