Questions tagged [shell]

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 programming features such as variables, substitution, output redirection, and wildcards.

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 programming features such as variables, substitution, output redirection, and wildcards.

The name was first used by Unix operating system for an interpreter used for command prompt, but currently the term shell refers to BASH(Bourne Again SHell) and other command prompt interpreters too.

1348 questions
8
votes
5 answers

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?
Howard
  • 2,135
  • 13
  • 48
  • 72
8
votes
2 answers

Allow www-data to execute shell script

I have a shell script called boot.sh on an Ngnix server I am trying to call it via PHP, but I don't think I have permissions. How can I give www-data permission to run boot.sh - and only boot.sh When trying sudo chown or sudo chgrp I am getting…
K2xL
  • 219
  • 1
  • 3
  • 8
8
votes
3 answers

Custom Openssh Shell

The environment is Ubuntu Server 12.04 I would like to create a user on a server that is only able to ssh into a shell that runs tail -f on a log file and closes the session once the program ends (ctrl+c). Is there a way to achieve this?
Matt
  • 1,142
  • 1
  • 12
  • 32
8
votes
1 answer

Create restricted user on Debian server

I want to create a user account for each of the key programs installed on my debian server. For example, for the following programs: Tomcat Nginx Supervisor PostgreSQL This seems to be recommended based on my reading online. However, I want to…
J.Zil
  • 1,123
  • 3
  • 21
  • 29
8
votes
5 answers

Forcing rsync to non-interactive mode

I would like to use rsync within a python script. I'm calling it using the subprocess module, and authenticating using public keys stored at the authorized_key file on the remote machine. The only problem is that when I use rsync using a wrong…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
8
votes
3 answers

From a shell script, how can I check whether a table in MySQL database exists or not?

I am trying to write a script which allows a user to select the what manipulation he needs to do on a table. I want to check if the table exists or not. If it exists I will continue the other things or else I exit saying table doesn't exist. How…
RathanKalluri
  • 81
  • 1
  • 1
  • 2
8
votes
2 answers

Getting shell script to run as a daemon on CentOS?

EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the incomplete question. EDIT (8:55PM EST 10/10/2011):…
Lester Peabody
  • 205
  • 1
  • 2
  • 9
8
votes
2 answers

My cron tasks report command not found

This is the contents of my crontab file: 0 0,6,12,18 * * * cd /var/www/app/current && backup perform --trigger db_backup --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp >> /var/www/app/current/log/cron.log 2>&1 0 3 * * *…
DEfusion
  • 287
  • 3
  • 9
8
votes
5 answers

How to add a linux user in single line?

Is there any option to add a user in single line. it includes the password. Dont prompt anything. OS=RHEL 5.5
Albin
  • 89
  • 1
  • 1
  • 3
8
votes
7 answers

BASH shell session logging on remote host

What's the best method of logging a BASH shell session to a file on the host machine? The preferred output format would be equivalent to PuTTY's "printable output" log setting, as viewed by the user inclusive of input and exlusive of ncurses control…
Andy
  • 5,230
  • 1
  • 24
  • 34
8
votes
8 answers

Linux = Is there something like a "Java Shell" instead of other linux shells?

The programming language I know most about is Java. Currently I have to write quite a lot of "shell scripts" to automate my servers. Is there something like a "Java Shell" so I can write the shell scripts in Java?
jens
  • 83
  • 1
  • 3
8
votes
3 answers

run shell command as other user called by PHP

I have a PHP script which is called by HTTP and not as command line script. This script should call a shell command as an other user than the current webserver user www-data. Example:
powtac
  • 639
  • 2
  • 6
  • 19
8
votes
8 answers

Most effective way to change Linux command prompt for all users?

I have several machines and the hostnames are really long.. i.e. companyname-ux-staging-web1.companyname.com. So my prompt looks something like [root@mycompany-ux-staging-web1 ~]# I'd like to shorten that up for all users on all machines with the…
incredimike
  • 330
  • 2
  • 3
  • 8
8
votes
6 answers

Find out how many DNS Queries/month via WHM or SSH?

Is it possible? We have complete control over our DNS server and the server actually being pointed to. We are interested in how many DNS Queries we are currently getting, as we want to move to Ultra DNS, but we need to know how many queries we're…
Kerry Jones
  • 145
  • 1
  • 2
  • 12
7
votes
1 answer

SaltStack | How to assign the shell output from cmd.run to Jinja variable?

Problem Unable to assign the output from cmd.run in my Salt State. The condition always return true even if the load_avg in the minion is not really equal or beyond the threshold. I also included in the configuration the things I have…
devxvda1
  • 185
  • 1
  • 1
  • 7