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
1answer
14 views

Linux: How to build a single command with parameters depending on current time range

I want to create a command which appends a specific parameter only when the current time is between midnight and 6am. Example pseudo-code: mvn clean verify <#if isBetweenMidnightAnd6AM> -...
1
vote
1answer
17 views

pfSense Shell : apply config modification without reboot

I'm currently trying to edit the configuration of a running pfSense in production with the pfSsh.php shell. By using the pfSsh.php shell I'm able to modify the configuration but once I write it, it ...
0
votes
0answers
12 views

Jenkins executing shell

I'm building a CI pipeline made up of a Jenkins master and several slaves in different machines. So far, the master forwards jobs to the slaves correctly, and these execute them. Master and slaves are ...
0
votes
0answers
6 views

Capture all output, error, warning and their appearance order of linux's command [migrated]

In linux we can redirect stdout and stderr or both of them to files. For example: Redirect stdout and stderr to two files: command 1>out 2>err. By this way, we can separate output and error in ...
0
votes
0answers
10 views

shell script hijacked my .htaccess files [duplicate]

Posted this on SO but was led here. I run a wordpress website and last night somehow a user was able to upload a shell script onto my server. This executed some linux commands modifying my .htaccess ...
1
vote
1answer
12 views

Can't get PID from backgrounded java job

The PID file for this statement is created but it is always empty. When running the shell with -x I see that $! empty, yet at the end the java job is left running in the background as desired. Why is ...
0
votes
0answers
15 views

How to recover a screen session? [migrated]

I'm running a screen session and it seems it hung up somehow. 0 ✓ user@hoster ~ $ screen -ls There are screens on: 30418.pts-2.hoster (Detached) 1 Socket in /run/screens/S-user. However, when I ...
0
votes
0answers
27 views

Boot from usb using UEFI shell

I need to boot my tablet from usb stick where my windows 10 install files are stored. There are no boot settings, I can access only UEFI shell see: That usb is blk0 and blk1 (when i unplug they ...
0
votes
0answers
27 views

If I know the inode of directory, is it possible to recover it after deleting?

More specifically, say I have a directory with lots of files in it. Suppose I know the inode of the directory. Now, if I delete the directory, is it possible to recover the files inside that directory ...
0
votes
3answers
107 views

How to SSH to all instances in EC2 cluster?

I just created a cluster using spark-ec2. I followed steps here http://spark.apache.org/docs/latest/ec2-scripts.html . Now I want to configure all slaves (150), i.e., install Java 8 for both master ...
0
votes
1answer
54 views

Check number of connections to webserver port 80 AND 443

As the title says how would one check the number of open connections to a webserver on port 80 and 443? I'm currently using this oneliner to get the number of open connections per ipaddress from port ...
1
vote
1answer
95 views

how to run a shell scripts at every login in Centos

Actually i want to run my shell script at every time when a user login as well as at boot. i have tried using using crontab but it runs only at boot not at every login.so please tell me how to do ...
0
votes
0answers
29 views

wget FTP directories with more than 10k folders

I have an issue trying to move servers. I have a couple of folders with 300k subdirectories and wget will only copy the first 10000 (the same number that Filezilla is capable of showing). Splitting ...
0
votes
0answers
10 views

Can the CRaSH Java shell run system commands?

CRaSH is a shell for Java. It runs in the JVM and is built to run commands against the JVM. I have a use case where I have access to a Java application and can deploy CRaSH against that application. ...
0
votes
3answers
70 views

GNU parallel doesn't fully utilize my CPUs

I'm running a command like this on my 36 core server (EC2 c4.8xlarge/Amazon Linux). find . -type f | parallel -j 36 mycommand The number of files to process is ~1,000,000, and it takes dozens of ...
8
votes
5answers
2k views

Run a script from anywhere

I have a script: #!/bin/bash echo "$(dirname $(readlink -e $1))/$(basename $1)" that sits here: /home/myuser/bin/abspath.sh which has execute permissions. If I run echo $PATH I get the following: /...
0
votes
0answers
20 views

Why wont my service run after reboot?

I have created the following service in the directory /etc/init.d of my Debian 7.2 Wheezy machine: #!/bin/sh ### BEGIN INIT INFO # Provides: myService # Required-Start: $all # Required-...
0
votes
1answer
27 views

Unable to SSH with shell into NAS: “error: openpty: Invalid argument”

I have a WD MyBook WorldEdition II (White Light) NAS here. This essentially is a ARM926EJ-S with two SATA drives attached. For quite some time, I was running Debian 6.0 Squeeze on it. Now I recently ...
1
vote
0answers
23 views

OOM using CRON but not using SHELL

When I start a java program by shell, everything is working well. However if I start the same program with the same command and same user by CRON, I get a java.lang.OutOfMemoryError just after a few ...
1
vote
1answer
103 views

error while playing ansible playbook

I just installed ansible on a server in aws and then created a playbook to run the same but while running i am getting error as below : ERROR! 'copy' is not a valid attribute for a Play The error ...
0
votes
0answers
11 views

MRTG Target field

Can I use OID and Shell Script in the MRTG Target field at the same time? For example Target[myrouter]: check_connection.sh&1.3.6.1.4.1.999.1:public@mydevice Please advise. Thanks
1
vote
1answer
79 views

How to create chroot'ed SFTP access on an Archlinux Server?

I've followed this instructions on the ArchWiki and GeekStuff to setup an user which can only access the server via SFTP (SSH) but without Shell (/bin/false) in a chrooted environment of his home dir. ...
0
votes
0answers
50 views

Terminal line wrapping issues only with Docker/Kubernetes

I'm on OS-X and running either iTerm or the standard OS-X terminal. In either case if I start a Debian docker container like docker run --rm -ti mycontainer:latest I get a command line prompt and line ...
2
votes
2answers
64 views

printing user of subshell obtaining root via su -

Can I print the username which is obtaining root access via su - on the root console upon obtaining root? user1$ su - password: obtained root via user1 #
0
votes
2answers
224 views

how to put files in ram

I have a server with 30 Gb ram and i have a script that put a (.ts) file (10mb) in /var/www/html/tv and script replace (.ts) file every 2 mintues. so my question is: can i mount this folder /var/...
1
vote
1answer
56 views

Unix move folders with pattern

How can I move subfolders with a pattern to the new location? Example list of sources: /data/aaa/_old/ /data/bbb/_old/ The destinations should be: /archive/aaa/_old/ /archive/bbb/_old/ Is ...
1
vote
1answer
44 views

nginx - How often was accessed to specific file or path? [closed]

I'm looking for a command/line to get the information how often was a specific file/path accessed from the web-server. (source: default access-log from nignx) It should check all logs (current and ...
0
votes
1answer
58 views

Looking for IPs by page visited in apache log (awk?)

I have a bunch of apache access log files and I want to know which IP addresses visited my /contacts folder. How can I collect them from all log files with shell command?
0
votes
2answers
86 views

Powershell equivalent of Ctrl+R?

In bash I can do Ctrl+R and start typing a command to have it search my history. How do I do that in powershell? Is there a way to bind a key to something like function GH($str) {get-history | ...
0
votes
0answers
20 views

Run a script if another process was spotted

I have CentOS 7 and looking for a sollution about a small issue. I want to have a sudo script to be run but only if the system executed a specific command remotely. For example: I've put my command ...
2
votes
1answer
243 views

How can I prevent shell access on a user account but show a custom message instead (on linux)?

For various reasons, I need to enable telnet access (over the private network), and when someone tries to log in with a specific user account (lets say CheckStatus), instead of giving the user a shell ...
-3
votes
1answer
35 views

How to cut a string after a number of characters in unix? [closed]

How to delete all characters in one line after point with with sed? I have a file with multiple lines like this: 123456789 3483 98765432 56345 985745634 3469 67495735 87654 Now I want to delete ...
0
votes
1answer
71 views

httpd reload as second command in bash fails

I am trying to run a command that carries out one action, to renew a certificate, and then reloads Apache. To do this I am running the following: sudo /home/ec2-user/letsencrypt/letsencrypt-auto --...
3
votes
2answers
61 views

Compare string on shell script

I'm creating a script to check the requirements about VM in one of my customer. The first part of the script is check if the OS is virtual or not. To achieve this goal I create the following script. ...
1
vote
1answer
28 views

Restrict user from executing shell commands using PHP

Let's say that i have shared hosting and i want to secure that place, from executing shell commands. I'v installed suphp, so that users can execute PHP separately. I also did some other things in ...
-1
votes
1answer
59 views

bash scripts work fine when I run it from command line but not from cron [duplicate]

I have this bash script in runtests.sh file #!/bin/bash cd /Library/WebServer/Documents/protractor_clipboards protractor testscript.js When I do this on terminal ./runtests.sh But when I try to ...
-3
votes
1answer
72 views

Run Windows Explorer on remote system from its cygwin shell through SSH [closed]

Please consider my problem :) 1) I Have a Windows 7 - x64 system with cygwin installed and SSHD running. 2) From another Windows machine , from futty, SSH to the above machine. 3) Command "TaskKill /...
-1
votes
1answer
54 views

How to use the awk,sed Modify the text?

As follows, some text 16G 16G 1.9G 40G 4G 4G 952M 60G 16G 16G 1.6G 40G 5G 780M 5G 80G I want to change all the unit from 'M' to 'G', like this 16G 16G ...
0
votes
0answers
7 views

App started as a service gets very low memory limit

I have created a service to manage an application, the Slurm resource manager. I however keep having problems with the resource availability. This is the service configuration file [Unit] ...
0
votes
1answer
174 views

Linux(redhat);Crontab; bash - script working from shell but not in Crontab - assigning command to variable fails

I know that my question was asked several times, but there is no solution for my problem. In my Company there is an Application running on a RedHat Mashine. Users connect a text Based GUI via ssh to ...
-1
votes
1answer
31 views

Folder migration ideas

I've got to the point where it impossible to load a folder on the server because there are so many sub-folders within it, getting close to 100,000. I currently store user's images in a filing system ...
0
votes
1answer
14 views

Different shell for SSH login on specific machines

I have Active Directory users with no local accounts, so they cannot use chsh. They can login to multiple different types of server and most of the time /bin/bash is the correct shell, or at least for ...
-1
votes
2answers
103 views

shell script to open many terminals from a parent terminal and execute different cmds

I want to open 5 terminals from a parent terminal and place these terminals on the screen properly so that each terminal can be viewed properly at the same time. Also, i want to execute differnet ...
0
votes
0answers
14 views

(Git-) Process not ending properly [duplicate]

I use a cronjob to call a git pull every minute: MAILTO="" */1 * * * * /home/pull.sh script: cd /home/webdir git pull origin release | grep -v "Already up-to-date" >>/home/git.txt This ...
0
votes
0answers
48 views

Not able to find root disk using prtconf in solaris

I am working on Solaris 5.10 server. I have a shell script for backup purpose. It uses the prtconf command & then searches for the root disk to create the backup. It runs the below commands. ...
2
votes
1answer
49 views

How properly handle deletion of pid.file in service script

I'm trying to write service script for application. So I can control it like this: ./myscript.sh start|stop|status On startup pid.file with process id creates, and based on it I can check status ...
0
votes
1answer
39 views

give www-data the permission to write into /home and others root directories

I have a big problem since few days with permissions on my Symfony2 application. The background : I write a PHP app with symfony2 which gives an overview of many Moodle instances on each servers ...
0
votes
2answers
59 views

How to ensure that the script and its command get killed once terminal is closed

I have written a script and it is working fine . It do some tail and grep operations. When I am closing my terminal and the greping the PID of my script , I can find the script is still present in ...
0
votes
1answer
108 views

How to edit /proc/partitions file in linux

I know /proc is a VFS and cannot be updated by user from shell prompt. this is my understanding from the beginning. Now , I am writing one code and where I am taking care of corrupted /proc/partitions ...
0
votes
1answer
15 views

List files that will be overwritten by tar extraction

Say I have a tarball ~/foo.tar containing foo/ foo/bar.txt foo/baz.txt foo/qux/ foo/qux/corge.txt foo/qux/grauply.txt And in my home directory ~ I have an existing foo directory and the existing ...