The shell-command tag has no wiki summary.
0
votes
1answer
67 views
Bash: php comand not found when called from a script run with sudo
I have this weird problem. The php command is not found in one specific sitiation.
I try to call the command in three different ways. Only one of them fails:
Being user john I create a simple ...
1
vote
2answers
30 views
Apache Run Command Line Command
I am working on a web server running on Apache in Linux. I am trying to use the system() call from PHP to use the Amazon EC2 Command Line tools (ec2-describe-instance,etc). However, it doesn't work. ...
1
vote
2answers
98 views
using strings (the command) to only find english words
My problem in a nutshell is that I want the list of english words that are output when I run 'strings' on a binary file. Currently the file I run it on dumps a lot of trash to the screen, and I'm ...
2
votes
2answers
152 views
trap “” HUP v.s Nohup ? How can I run a portion of shell script in nohub mode?
I want to run a shell script over the weekend, but I wanna make sure if the terminal loses
the connection, my script won't be terminated. I use nohup for the whole script invokation, but I also want ...
4
votes
3answers
124 views
How to execute a command on multiple hosts using IPv6 only?
First of all there is pdsh which is essentially a parallel distributed shell which may execute commands on a list of given hosts. However, I find myself in an IPv6 only problem setting. It seems that ...
0
votes
2answers
164 views
find the cpu usage of a process on Ubuntu?
Is there a way to find the CPU usage of a process on ubuntu combined with the cpu usage of all the child process. And also would it be possible to get this number as a % of the total CPU usage?
-3
votes
1answer
60 views
bash + create proccess from function before program ended
the following short bash program described how to execute the func1 by process ( func1 & )
func1 is function that do some tests and verification on Linux machines
And this program run after ...
0
votes
1answer
159 views
Continue running a task with terminal disconnected?
Say I'm running a task on a remote (Ubuntu) server which last hours, but I need to disconnect my shell client now. Foolishly, I didn't use screen or think of starting the task with nohup.
Is there a ...
1
vote
2answers
246 views
Amazon EC2 instance - issuing “top” command just goes blank on the ssh terminal
I have created an Amazon EC2 micro instance, running Amazon AMI. I logged into the server using ssh client. Once it logs in successfully, if I issue the "top" command, the top output never shows up ...
0
votes
1answer
56 views
How do I use the excape characters properly in csh's builtin echo command?
I'm trying to build my fstab during install with a script, so I want to have something like this:
printf '# Device\t\tMountpoint\tFSType\tOptions\t\tDump\tPass#' >> /mnt/etc/fstab
printf ...
1
vote
1answer
65 views
How do I use a shell builtin command rather than the system command?
I'm specifically asking about FreeBSD. I am using the default /bin/csh as my shell. There is a binary version of echo at /bin/echo, and there is an echo command built into the shell. The system ...
1
vote
3answers
210 views
What is Juniper's equivalent to netcat/nc command?
On Linux there is a nice tool for testing connections, bandwidth, opening temp. connections etc: nc
What is equivalent on Juniper firewalls?
1
vote
1answer
55 views
Pre-supplying answer to linux program
When I run the following command:
yiic webapp main /home/david123/domains/david123.servehttp.com/public_html/main
It waits for my answer:
Create a Web application under ...
0
votes
1answer
367 views
Ubuntu command to constantly monitor a service?
I was curious if anyone new a command like tail or top to constantly
monitor a service as it runs. I'm trying to watch sendmail currently
to see who is connecting to it, but would like to have it a ...
0
votes
2answers
67 views
Search and sync files from remote systems
I have a folderA remotely which has 2 subfolders folderB and folderC.I have to search for my
file where it is located in the 2 subfolders(folderB and folderC) and should copy it.
Is it possible with ...
0
votes
2answers
477 views
How can I script creating email aliases for existing mailboxes in Exchange 2003?
I need to create lots of email aliases (more than I want to do manually), so I want to know if there's a way I can script the addition of aliases to existing mailboxes/users. I don't mind if I have to ...
0
votes
1answer
273 views
Jasper Reports on CentOS Server acting strange
So I added Jasper to my classpath, got Apache ant installed and everything seems fine. I went to hsqldb directory and run "ant runServer" & "ant runManager" and both started up. I went to a sample ...
0
votes
1answer
141 views
php scripts becomming defunct
I have a problem on a page "php scripts continues to become defunct", and appears to be the page1.php script. Parent process is terminated while child is not being terminate. I am using shell_exec ...
0
votes
1answer
524 views
what does the command `set autolist` do?
Any idea what the autolist argument means? I could'nt find anything about it in the manual.
0
votes
2answers
53 views
Which process creating cracker files?
A large number of cracker files with name FOO** are created by some of the process. I executed following command to found culprit process
lsof -f -F /tmp/*
But didn't found anything useful.
Is ...
1
vote
1answer
408 views
cp: command not found
I have an shell file with the following contents:
#!/bin/sh
echo "enter code hereecho "Enter the site name, followed by [ENTER]:"
read site_name
mkdir -p /usr/local/xpay4$site_name
cp ...
0
votes
2answers
1k views
Shell script to keep backups for last 3 days, last 3 weeks and last 3 months
Am not entirely sure how to do this due to my lack of shell knowledge.
NOW=$(date +"%Y.%m.%d.%T")
tar czf /backups/web_backup_$NOW.tgz /web/
Can you please assist me to delete old backups so that ...
1
vote
3answers
2k views
Scripting (piping) commands into a telnet session
i use a cronjob to execute a filetransfer to a host and then telnet into the host and pipe some commands into it.
HOST=somehost
USER=postgres
PASSWD=blabla
ftp -n -v $HOST <<END_SCRIPT
quote ...
1
vote
5answers
421 views
selective backup script in bash
I've been using this simple command (that's all I can do :) to backup the whole tree from my user data in NAS server for a year.
cp -r /STORAGE /BACKUP-STORAGE/YYYY-MM-DD
Unfortunately, after a ...
2
votes
2answers
342 views
How to power a serial port under linux?
I got a serial to ethernet device connected to a Serial (COM) port on a Linux machine (debian etch), I connected it correctly but it did not power up, I suppose I need to power the device port, anyone ...
3
votes
3answers
2k views
How does cd command work? (unix) [closed]
Could anybody explain to me how cd - command work? man cd tells me that An argument of - is equivalent to $OLDPWD. Then I found on the net that $OLDPWD is the previous working directory as set by the ...
0
votes
3answers
595 views
How to run a command after receiving a mail with exim4?
Where can I tell exim to run a shell/php command everytime a new mail has been delivered to a virtual mailbox. It does not matter to which user the mail is delivered?
1
vote
1answer
144 views
How do I change the prompt of Windows commandline permanently?
I use Prompt command to temporarily change the Windows command prompt's inline prefix. So instead of current directory, I choose it to display something like current time and the $ sign.
But when I ...
0
votes
2answers
717 views
Get screen window title
I'm looking for a way to get the current window title in GNU screen .
I have a script that use screen -X title something to change the window title when running and I would like to set it back to it's ...
