The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
3answers
3k 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 ...
4
votes
3answers
200 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 ...
2
votes
2answers
659 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 ...
2
votes
2answers
407 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 ...
1
vote
5answers
450 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 ...
1
vote
1answer
71 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 ...
1
vote
3answers
2k 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
1answer
104 views

The permission to run 'ls' is denied

I'm running my server as a root user but despite that, when I run the command ls I get this error: bash: /bin/ls: Permission Denied. I tried to change this file's permissions with chmod but the ...
1
vote
2answers
629 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 ...
1
vote
1answer
83 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
1answer
585 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 ...
1
vote
3answers
3k 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
1answer
160 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 ...
1
vote
2answers
116 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
298 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 ...
1
vote
3answers
317 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
1k 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.
1
vote
1answer
675 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
2answers
640 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
279 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 ...
0
votes
1answer
198 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 ...
0
votes
1answer
643 views

How to pipe and echo the result that is being processed? [closed]

I'd like to execute this command: find /apps/ -type f -print0 | grep -z log$ | xargs -0 grep 'this->aForm' And in parallel, I'd like to see which files are being processed. How to to this?
0
votes
3answers
963 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?
0
votes
2answers
865 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 ...
0
votes
1answer
29 views

unable to run the script in linux using plink

I'm unable to run a script in linux using plink.exe. I'm using my user x to login and script is under y user, which I need to sudo to y and run it. I was able to at command prompt manually but not ...
0
votes
1answer
78 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 ...
0
votes
1answer
668 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
58 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 ...
0
votes
2answers
238 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?
0
votes
2answers
71 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
1answer
391 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
169 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 ...
-3
votes
1answer
66 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 ...