A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion. Not only does it allows the user to run programs from a text interface, but frequently offers basic ...

learn more… | top users | synonyms

0
votes
0answers
6 views

How do I capture the Maven Jar name as a part of a Hudson job?

I have a Maven 3 job configured in my Hudson server. When the Hudson server successfully builds the Maven jar, I have the jar being deployed to an SCP repository on another server. I want to execute ...
-2
votes
1answer
28 views

Crontab not working to send email [on hold]

I have CentOs 6.5 running on a VPS Host. I installed crontab and email using the below commands yum install vixie-cron service start crond chkconfig crond --levels 235 on yum install sendmail ...
0
votes
0answers
63 views

SSH without invoking shell

I've managed to mess up some shared libraries on my system, and now my shell cannot be run, thus locking me out of the system. Both ssh, sftp, and scp, as configured on the remote system, seem to rely ...
1
vote
0answers
191 views

How to delete older files in a folder in unix? [migrated]

Can anyone help me find the meaning of the below statement? I am new to Unix programming. find /sourcedirectory -mtime +2 -exec mv "{}" /destination/directory/ \;
-1
votes
1answer
29 views

How to access a system with write permission after file system check fails?

I created three new partitions, but after a reboot, the system is being dropped to a shell: /dev/mapper/group-newpartition: clean, 11/655360 files, 276620/2621440 blocks [FAILED] An error occurred ...
-2
votes
1answer
15 views

zsh substitution, can't do regex with repetition

I'm trying to perform ZSH variable substitution, but I'm having to do it the lame way, by piping through cut. Is it possible to perform this operation entirely within ZSH? ...
-1
votes
0answers
35 views

Append files with bash one-liner? [migrated]

Currently I use multiple lines to append content into a combined file, e.g. ./myprogram 1.txt > Out.txt # Overwrite for the 1st file ./myprogram 2.txt >> Out.txt ./myprogram 3.txt >> ...
-1
votes
0answers
40 views

Cron job not being executed fully [duplicate]

I've created a small line that should pull some data from git every hour, unfortunately, it's not being executed fully. My command looks like this: cd /var/repo && git pull origin release ...
0
votes
1answer
40 views

Where is this bash shell alias being configured?

While logged in as root onto a CentOS 6.5 system, I run ># alias alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias ...
0
votes
1answer
32 views

chattr: undefined symbol: set_com_err_gettext

I've moved my CentOS 6.5 installation to a new server and I'm unable to use chattr on my new server: chattr: symbol lookup error: chattr: undefined symbol: set_com_err_gettext How to resolve this ? ...
0
votes
0answers
18 views

shell exec command not running ffmpeg [migrated]

I am writing this simple command to execute ffmpeg but shell_exec is not giving any result. Otherwise it is giving result with ls. here is my code { <html> <body> <?php $output = ...
0
votes
1answer
81 views

Can't run AWS CLI from CRON (credentials)

Trying to run a simple AWS CLI backup script. It loops through lines in an include file, backs those paths up to S3, and dumps output to a log file. When I run this command directly, it runs without ...
0
votes
1answer
47 views

How to prevent syslog message popping in a ssh session without affect other sessions?

i have a machine(RHEL 5.2) which receives syslog message from remote machines. And now it keeps popping message from remote machine in a ssh shell, which is annoying when i want to do something on it. ...
0
votes
0answers
41 views

Distributing Master node ssh key

For the master node to passwordless-ly ssh into the slaves, the master needs to distribute its ssh key to the slaves. Copying key using ssh-copy-id asks for the user password. If there are hundreds of ...
2
votes
3answers
58 views

Can I use Bash interpreter in service/daemon scripts?

I'm writing a Debian/Ubuntu service that should start on at runlevel 2-5. Most of the existing services I came accross are written using /bin/sh (Shell) interpreter while /bin/bash (Bash) offer lot ...
2
votes
3answers
80 views

Common login script

Few weeks ago I thought it would be a good idea to write a script which should send me an email whenever some user would log in into my server. So I came to a perfectly working script ...
0
votes
7answers
162 views

better way to loop through a list of servers

I regularly do things where I loop through a list of servers to take some action. For example: for s in `cat servers.txt` ; do echo; echo $s ssh $s 'do something' done I'm wondering (from a ...
0
votes
1answer
47 views

Shell script won't run ruby script file

My shell script (my_shell.sh) won't run the ruby script ("ruby_script_1.rb) in it. my_shell.sh #!/bin/sh # Invoke the ruby script here ./ruby_script_1.rb It could not find where the ...
0
votes
1answer
35 views

Bash function hangs while command run perfectly without function

Following function hangs : ssh() { local RESULTS; RESULTS=$(ssh $USERNAME@$SERVER $SSH_COMMAND1); echo $RESULTS; } ssh; while if i run following commands they work fine : ...
0
votes
2answers
55 views

Access local console via SSH

I am searching for a way to interact with a local console via SSH - just as you would do with an directly connected keyboard. In my particular case I got a debian server (console only, no X system) ...
0
votes
0answers
11 views

Ctrl-C is ignored by pppd when put in a shell script

I'm trying to connect to GPRS network through a serial port connected GSM modem. When I call /usr/sbin/pppd call <peer_name> from the command line, It correctly receives and handles Ctrl+C from ...
0
votes
1answer
39 views

prevent normal users from running code on a cluster outside of pbs system

In our cluster with PBS batch system (torque) installed, we wish all the users execute their jobs by qsub so that the CPU resources can be well managed. However, it is found that users in our cluster ...
1
vote
3answers
66 views

How to log multiline message with logger command?

I want to log a multiline message into the system logger via the commabnd echo -e "foo\nbar" | logger But it appear as 2 logs. Is it possible to log as a single log?
3
votes
5answers
200 views

Hide the output of a shell command only on success?

Hiding the output of a shell command usually involves redirecting stderr and stdout. Is there any builtin facility or command which by default hides the output but on error dumps all the accumulated ...
2
votes
2answers
53 views

How to keep script from swallowing all of stdin?

I have a script that reads from a pipe in a loop and runs an expect script and a normal shell script in the loop. Both scripts run ssh to another server to grab a piece of data. For example: cat ...
0
votes
2answers
48 views

Delete oldest directory, skipping two of them

I have to delete oldest directory. But, two of directories does not have to be "included" in this action. So, directory content looks like this: [root@myserver backup]# ls -la total 84 drwxr-xr-x 21 ...
2
votes
2answers
130 views

Linux locale: en_US.UTF-8 vs en_US

I usually config my ubuntu via sudo locale-gen --purge en_US.UTF-8 And I've the installed locales # locale -a C C.UTF-8 en_US.utf8 POSIX Is it okay since I am missing en_US?
8
votes
6answers
355 views

Find directories, where files with a specific ending are missing

I want to display all directories, that do not contain files with a specific file ending. Therefore I tried using the following code: find . -type d \! -exec test -e '{}/*.ENDING' \; -print In this ...
1
vote
3answers
65 views

locale-gen with purge does not work

I use the --purge option to remove existing locales before generating new one, but seems cannot remove existing locales? e.g. # locale-gen --purge en_US # locale -a C en_AG en_AU.utf8 en_BW.utf8 ...
1
vote
5answers
135 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
108 views

Shell script only executes partially when run with CRON [duplicate]

I've written a shell script that does the following: Retrieve mail from a POP3 account (using GetMail) Save a copy of that email to S3 (using AWS CLI) Email me the filesize of the email The ...
1
vote
1answer
68 views

Replacing LineFeed \x0a with SED

I have to delete lots of Linefeeds (Hex \x0a) in a logfile. I just have sed to solve the problem. It is a bit complicated I know.. Do you have idea how to solve the problem? Here is an example ...
0
votes
1answer
670 views

What's the difference between sudo su - postgres and sudo -u postgres?

PostgreSQL users peer authentication on unix sockets by default, where the unix user must be the same as the PostgreSQL user. So people frequently use su or sudo to become the postgres superuser. I ...
3
votes
2answers
119 views

What is the difference between “su --command” and “su --session-command”?

Running # su - oliver --command bash gives a shell but also prints the warning bash: no job control in this shell, and indeed Ctrl+Z and fg/bg don't work in that shell. Running # su - oliver ...
0
votes
1answer
119 views

Disable the ability to hide bash command history

User can hide the command history in bash by either append a space before the command unset HISTFILE How to disable this?
0
votes
1answer
135 views

Create setenv.sh to set system property

I have to use setenv.sh to set system properties. I am using Linux OS and Tomcat Server 6. As described here Linux Environment- setenv.sh , I have created a setenv.sh in tomcat/bin, and the only ...
0
votes
1answer
23 views

Dpkg: After comparing config files, how do I revert back to make my choice?

I'm part way through a fairly large apt-get upgrade which had 65 packages to be updated. I've gotten to a config file "merge conflict" where both my local config (containing a licence key) and the ...
0
votes
2answers
85 views

Gnu parallel not utilizing all the CPU

I have a simple python script that read from stdin (a single line), do some processing (string parsing, no IO involved) and output to stdout e.g. python parse.py < in.txt > out.txt I have an ...
0
votes
1answer
112 views

How to set the default shell when chsh is not present

I've a Synology DS412+ NAS box running Busybox, which has a default shell of ash. Previously, ipkg install optware-devel was run and it installed bash and set it as the default shell. Running ipkg ...
8
votes
2answers
465 views

Symbolic link and sudo

I create a symbolic link: ln -s /tmp/folder1 /tmp/folder2 Then I go to /tmp/folder2 and run pwd: $ cd /tmp/folder2/ $ pwd /tmp/folder2 $ sudo pwd /tmp/folder1 # <-- This is the odd part Why ...
-1
votes
2answers
61 views

can't find the executable for the command linux 'source' [closed]

i am using ubuntu server 12.04 lts. I am looking for the executable of the linux command source i can not find in the /bin nor /usr/bin nor /usr/sbin nor /usr/local/bin . I used whereis source it ...
4
votes
1answer
71 views

Is there a streamlined way to export settings from an existing CentOS 5.10 server for local Vagrant provisioning? (Puppet, Chef, shell, or otherwise)

I've recently started the process of learning how to use Vagrant for spinning up a local development environment. (after getting frustrated with the various WAMP stack options) Vagrant is great so ...
0
votes
0answers
949 views

rsync: getcwd(): No such file or directory (2)

I want to sync Server1 and Server2's logs to LogServer. For Server1: rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/ This one works, but for Server2: rsync ...
0
votes
1answer
57 views

How can the mutt shell-escape feature be disabled?

We are thinking of offering mutt for our member's email client. The user's shell is instead the mutt application launched on their Maildir folder. It works great so far but one huge problem is the ...
2
votes
1answer
36 views

Inspecting how $PATH gets created

Is it possible to "listen" to a variable's value during the start of a new shell? I have a script that checks for the $PATH variable in the typical places, but I'd like to try something different. ...
2
votes
3answers
83 views

How do i change the global login shell on a unix system?

I want to set the login shell (the shell they get when they log in) of all existing and future users. The correct way to change the login shell seems to be chsh. But this only allows me to change the ...
0
votes
1answer
404 views

Automatically starting C# Mono application on Ubuntu server

I have a TCP server written in C# which I will run on my server. I've tested the application running on the server and client side and it all works great! I'm using mono on my Linux server to run the ...
2
votes
2answers
44 views

ssh dissable login, but allow copy-id

I have a user that's only used for a proxy, so no one can login. #passwd file entry proxyuser:x:996:99::/home/proxyuser:/bin/false but, I'd like to enable ssh-copy-id to that user How do I do ...
0
votes
4answers
207 views

cron job executing script [duplicate]

I have created a script that works as expected in shell but cron job does not seem to run it. when I check my cron mail, I see that it prints "hltv is not running" but does not create a screen ...
1
vote
3answers
243 views

Changing the mysql bind-address within a script

What would be the best way to change the mysql bind-address in the my.cnf from a shell script? Is there a way using a tool like mysqladmin or should I use sed or should I simply append it to the ...