A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
0
votes
1answer
16 views
curl cookie and cookiejar trouble
I've got a script that curls a site using a specific cookie value in a cookie file. When I run this on my local system, the server returns the same value to my cookie jar, as per my expectations. When ...
0
votes
1answer
68 views
Why is this flag not working?
Ok so i want to view the ram and have it run continuously
root@another:/etc/mysql/database_backups# free -mt
total used free shared buffers cached
...
0
votes
2answers
30 views
Send Email as last task on task sequence in MDT 2010
I'm currently trying to setup a task that will email me when the deployment has finished. It seems fairly simple, and I've looked online as a reference. I found one person (Johan I believe) that had ...
3
votes
2answers
77 views
Is there a .history file on Windows machines?
Is there an auditable file on a Windows machine that shows the command-line history for either cmd or PowerShell? On UNIX machines I believe there is a hidden file in the home directory called ...
1
vote
1answer
57 views
Win2008Server R2 - no window running .bat file via task scheduler
I'm running a couple of batch files via Task Scheduler that call rsync.
The .bat files work great when run manually and appear to be running fine via TS as well. HOWEVER, it does NOT open a cmd ...
2
votes
3answers
83 views
Linux: rename file/dir in it's current location w/o changing pwd to that location?
At the command line, lets say my pwd is something like:
/home/whatever
And there is a file in some deep directory that I want to rename. Normally I would do this:
# mv ...
1
vote
1answer
111 views
How to export User Rights Assignments and import them on another machine
How would one export all of the user rights assignments from one Windows Server 2008 box and import them on another. Neither would be on a domain so this would just be local security policy.
0
votes
2answers
46 views
Windows 7 permissions: PHP can create files but cannot delete them
I'm having the oddest problem ever with Windows 7: My scripts positively CAN create files in a given directory, but then are unable to delete those same files.
My server is currently a local XAMPP, ...
1
vote
1answer
117 views
Wget from HTTPS url using user/password -still getting 400 error
I'm trying to run Wget for a certain HTTP url, also using http-user and http-password command line options (tried the --user and --password, same results).
Using the --no-check-certificate options as ...
1
vote
1answer
95 views
Sending mail from command line if body not empty
I'd like to write a simple script that alerts me if a log changes. For this I'm using grep to find the lines I'm interested in. Right now it works like this:
grep line /var/log/file | mail -s Log ...
0
votes
1answer
24 views
Tool for re-permissioning Citrix published apps?
We have Citrix XenApp 4.0/4.5/5.0 farms with hundreds of published applications which we will need to edit, preferably through a scriptable command-line tool. I've searched the Citrix Administrator's ...
0
votes
4answers
58 views
“Command not found”-unable to run the bash script [closed]
Possible Duplicate:
My cron tasks report command not found
I am trying to run a bash script
#!/bin/bash
export AWS_CLOUDWATCH_URL=https://monitoring.amazonaws.com
# get ec2 instance id
...
4
votes
0answers
149 views
Accidently created a file called -X, how can I delete it? [migrated]
Like an idiot, I ran this command:
tar -cf -X awstats-icon icon tarfile.tar .
I was trying to use the -X switch to exclude awstats-icon and icon directories.
Now I have a large file named -X ...
0
votes
1answer
114 views
Piping DSQUERY commands together
Can DSQUERY commands be piped together?
eg to return a list of users in each of the groups found within the 'Builtin' container?
dsquery groups "cn=Builtin,dc=domain,dc=company" | dsquery groups ...
1
vote
2answers
134 views
Adding a random delay for a Linux command
I am using func to perform parallel commands on our servers.
The other day, we had an issue when a service restart of puppet via func made all our severs hit our puppetmaster at the same time.
My ...
1
vote
1answer
106 views
How do I grant “log on as a service” permission to a (local) from the command-line?
On Windows Server 2008 R2 Core Edition, how do I assign the "log on as a service" permission to a user, from the command-line?
(ntrights.exe from the Win2003 resource kit is not included in Win2008 ...
0
votes
0answers
22 views
Is it possible to set up a pptp server in windows via console?
I want to be able to turn a machine into a pptp server from commandline so that it can be scripted, is this possible?
0
votes
2answers
17 views
parted subtracting partition size 16896 from size given
When I create a partition using parted(mkpart) giving unit as Bytes, it is creating "size given - 16896" byte sized partition.
Is there any specific reason to less 16896 bytes from the partition ...
0
votes
1answer
77 views
upload file to server via rdc in command line
I have access to server only via RDC, and I was wondering if is it possible to upload file to it via command line? I've got application that only can be run on the server, and modyfing some files and ...
2
votes
2answers
74 views
BASH: Newline or HR after long command output
Is there any way to configure Bash to print a newline or horizontal line after commands that provided more than N lines of output? For instance, after a simple cd I don't need a newline or horizontal ...
2
votes
1answer
49 views
What does the leading dash in process cmdline mean?
I noticed a process taking full CPU on my linux server, of which the COMMAND column from top -c is -bash.
cat /proc/<pid>/cmdline shows -bash too.
What does the leading dash mean?
More info: ...
8
votes
5answers
485 views
How do I append a specific number of null bytes to a file?
I have a script that writes to a few files but I need them a specific size. So I'm wondering if there's a way of appending a specific number of null bytes from /dev/zero or however to a file?
1
vote
1answer
52 views
FTP not working between servers, only in command line
Hello I have a strange problem, I want to transfer files via ftp between two servers.
When I transfer the files sing the client, it works fine, but when I use command line I get:
425 Can't open data ...
-4
votes
3answers
137 views
Can I figure out if my server has IPv4 or IPv6 from a CLI?
Is there any method (via CLI) of knowing if the server I'm at has IPv4 or IPv6?
EDIT: As for the reason why I'm asking this question (apologies if I wasn't specific enough), I'm referring to this ...
0
votes
1answer
34 views
're' field in sa -m command
Can you tell me the significance of re field in sa -m command.
# sa -m
9053 4.56re 0.08cp 1003k
mjz 9000 ...
3
votes
4answers
193 views
How can I manually run a nagios check from the command line?
When defining and testing new services in nagios I have been restarting nagios, then clicking the service, and rescheduling a check for as soon as possible, then waiting until the check happens.
Is ...
3
votes
2answers
66 views
How to tarball a directory without carrying over /path/to/folder?
Example command:
$ tar -cvjf destination.tar.bz2 /path/to/folder/source
I'd like the final destination.tar.bz2, when extracted, to not include a /path/to/folder/ file directory. It seems inefficient ...
2
votes
1answer
55 views
Lining up output in linux cli
I have a tool which outputs four columns of data with a space between each. However, the data items are variable length, and it's hard to read what's going on.
Is there a way I can line the output up ...
11
votes
3answers
145 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 ...
57
votes
23answers
13k views
How do I prevent accidental rm -rf /*?
I just ran rm -rf /* accidentally, but I meant rm -rf ./* (notice the star after the slash).
alias rm='rm -i' and --preserve-root by default didn't save me, so are there any automatic safeguards for ...
0
votes
2answers
206 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. ...
-1
votes
1answer
48 views
/data/tmp on database server? [closed]
I am on a Linux ubuntu machine with MySQL installed.
My teacher gave out an assignment which mentioned "copy cars.dat to /data/tmp on the MySQL database server" without any explanations, I do not ...
2
votes
4answers
136 views
Can I change a user password in Linux from the command line with no interactivity?
I have a specific use case where I would really like to be able to change a user's password with a single command with no interactivity. This is being done in a safe fashion (over SSH, and on a system ...
0
votes
3answers
66 views
“chown mysql:mysql /data/tmp” command
I am on a Linux ubuntu machine with MySQL installed.
If there is a MySQL installation on a Ubuntu machine, I saw some people doing the following thing:
sudo chown mysql:mysql /data/tmp
I get ...
0
votes
4answers
117 views
Windows XP batch file to block all incoming and outgoing traffic
Is it possible to block all incoming and outgoing traffic on a Windows XP host via batch file?
Bonus question, I only want to allow 1 outgoing port and all traffic going over that port.
0
votes
1answer
108 views
icacls in windows 7 does not give full permission to write files in root drive
icacls in windows 7 does not give full permission to write files in root drive.
We have a very old application based on Omnis7 that needs to create and read/write files on drive C: when running as a ...
1
vote
0answers
52 views
Controlling rdp listener connections from command line
RPD on my windows 2003 server sometimes becomes incapable to accept connections. But netstat shows that port is listened.
c:\> netstat -ano | find "3389"
TCP 192.168.1.1:3389 0.0.0.0:0 ...
0
votes
1answer
87 views
How to change the proxy settings for the Network Service account from the command prompt?
Currently, I am only aware of the following command:
C:\>bitsadmin /util /SetIEProxy NetworkService MANUAL_PROXY 1 92.168.0.200:8080 NULL
But, it has the following defects:
It is deprecated
It ...
1
vote
1answer
55 views
What's the best way to upgrade to centos 6
We have a CentOS 5 system with a few programs php, apache etc. It's our local office server as well so we want to keep downtime to a minimum. What's the best way to upgrade to CentOS 6.
I also just ...
-2
votes
2answers
58 views
Mutt, empty email account from command-line
trying to figure out a cli way to empty all email from a specific email account.
It is certainly possible to type:
mutt -f account
D
~s .*
then quit....
Is there a way to do this all from ...
0
votes
2answers
79 views
Adding a CLI for PHP5 on live server
I want to add command-line support for PHP5 on my server. When I run aptitude install php5-cli I get a message saying that my PHP modules/packages have unmet dependencies.
Here is a list of packages ...
0
votes
2answers
149 views
Send message to another Computer through Network via CmdLine
I would like to send from a server ( Windows 2008 R2) a pop up message to another Computer in the Network (Windows 7). I already enable AllowRemoteRPC in the registry of my Windows 7 system.
This cmd ...
2
votes
1answer
38 views
Scripted printer configuration changes
I've got about a dozen Windows XP machines that I need to make a couple specific printer configuration changes to. The printer is local "virtual" printer connected to a program for an electronic ...
0
votes
1answer
23 views
Collect output of top command displayed with separate option
I would be grateful to you for some details about the top command output achieved using the hotkey "A". I suppose the it gives back the swap usage per PID: it is right, isn't it?
Could you please ...
0
votes
5answers
252 views
SSH command from PHP script - nothing, yet work at cmd line
I'm working on an EC2 box and trying to SSH command another box.
The command works in command-line, even php -a interactive. However it does not work when running as apache. Example cmd:-
...
2
votes
1answer
41 views
Modifying OSX Server 10.5's DNS from the command-line
I'm trying to figure out how to add records to my server's DNS from the command-line. I've investigated the 'serveradmin' tool, plus 'scutil', but neither appear to give me access to modify the DNS ...
1
vote
1answer
25 views
Can't change path location of PHP on mac os x snow leopard
I have XAMPP installed on my mac, and I want to make command line PHP use the same executable as XAMPP since I've customized that php's php.ini file.
The php binary I want is located at:
...
0
votes
2answers
171 views
how to get default gateway of certain adapter in windows bat?
Please see below ipconfig output in windows.
C:>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection 11:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . ...
1
vote
3answers
75 views
Security issues of Running command with PHP script
I want to run a command line program with PHP script. What are the security issues of doing this on VPS?
I've heard a lot that this is not secure. But want to know how exactly? Also, what will be the ...
1
vote
3answers
44 views
How to modify configuration file from command line?
For example, I often need to login to a new virtual machine just to open "/etc/ssh/sshd_config" and set "PasswordAuthentication" option to "no".
In this way, I can not automate this process.
How to ...