A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

2
votes
2answers
46 views

How to sudo using another user's account password from a script?

I have a bash script running as user, a user account with no evaluated privileges. The machine has a second account admin which has sudo privileges. There is no root password set. The script knows ...
0
votes
1answer
118 views

No such file or directory .zshrc

Recently, I realized I haven't been able to run . .zshrc in my home directory. It gives me the error above. It's really strange and it's bugging me out since it's worked perfectly fine in the past. ...
1
vote
1answer
105 views

How to prevent “source” in a bash script from passing the script's arguments?

These questions address the functionality of source: What is the difference between executing a bash script and sourcing a bash script? What does 'source' do? but I'm confused as to why ...
0
votes
0answers
14 views

Fullscreen TMUX sessions selection

I've found TMUX's choose-tree command to be quite useful when navigating between sessions, but I dislike it only displaying inside of the current pane. I'd prefer it to overtake my entire screen. ...
3
votes
1answer
123 views

Why ctrl+c in console kills the background process

Could you explain why Ctrl+C in my bash shell affects the command that was run previously in background with: `./my_script.sh 1` & The command immediately finishes the execution with 130 code: ...
1
vote
1answer
34 views

Sort files by date and copy every other to new folder

I was wondering what would be the most concise way of sorting files by date and then copying every other to a new folder. My problem: I've got files renamed such that they are called file1 (101) ...
-1
votes
1answer
144 views

WinSCP/PuTTY: Cannot move file on server via sudo: Permission denied

I have uploaded a file to a remote Linux server. current directory is: /home/user/file.war Now i want to move the file into tomcat webapps folder and overwrite the existing version: The directory ...
0
votes
0answers
14 views

Which library implements the NO_PROXY variable?

Which library implements and passes to the network stack the NO_PROXY variable? Considering that is being read from a shell (ZSH, bash) or other programs. Is it just a variable that other programs ...
0
votes
1answer
9 views

Bash Export Syntax Compatibility

I often see commands written with the following syntax and I am curious if this is done for compatibility reasons: Snippet from Default .bash_profile on CentOS # User specific environment and ...
0
votes
0answers
12 views

Checking if file exists to launch different programs

I use the following code to check for a file named loaded in the shared folder.This works when the file is placed in the local dir but it does not write the file to the shared folder. What I'm i doing ...
0
votes
2answers
405 views

Explorer.EXE Crash, Related to SHELL32.dll

I recently experienced another Windows Explorer crash. I have been experiencing Windows Explorer crashes sporadically for some time now. I was able to capture the event log. Context: Occurs commonly ...
1
vote
1answer
50 views

Make `last` display year in Terminal

Is there any way to get last (on Mac OS X 10.11.2) to display a full date (including year)? Right now it displays only day and time: user$ sudo last user | head -n3 user ttys000 ...
1
vote
1answer
43 views

How to chain a group of commands in Fish like { … } Bash?

I'm aware of chain Fish commands via && or || but I'm willing to chain a set of commands Code env git clone --depth=1 https://github.com/rafaelrinaldi/theme-pure.git; or { printf "Error: ...
0
votes
1answer
183 views

How can I send email with attachment xls file using shell script as application/xls mimetype without making the received file becoming unreadable

#!/bin/bash ATTACH1=file.xls<br> SUBJECT="subj"<br> FROM=me@domain.com<br> TO=you@domain.com<br> CC=them@domain.com<br> MIME="Application/vnd.ms-excel" <br> FILE=$...
1
vote
1answer
432 views

The “shmmax” value is too large when installing Oracle 11g on RHEL7

I am trying to install Oracle Database 11g Release 2 on RHEL 7.2. Executing runfixup.sh, it outputs: # /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh Response file being used is :/tmp/CVU_11.2.0.1.0_oracle/...
0
votes
0answers
20 views

does POSIX shell specify order of evaluation of arithmetic operands?

When executing a command such as echo $(( $(sleep 10; echo 0) + $(touch foobar.txt; echo 0) )) I observe (with current dash and bash shells) that the file foobar.txt does not appear instantaneously ...
1
vote
3answers
89 views

sed command in console works; but in shell script it throws error

I am trying to write a shell script to replace the SEARCH string by REPLACE string in all the files of the current directory (directory where my script remains). The condition I have is : the script ...
0
votes
0answers
29 views

How to save console output with timeout command

I want to be able to save console output of a php script when I am using timeout. The following command runs the script but does not create the xyz.out file timeout -k 10s 3h nohup php foobar.php >...
0
votes
0answers
40 views

Linux hangs after rebooting

I have a script that needs to run at boot time, I set it up using update-rc.d and now when I reboot the system with sudo reboot the system hangs during the boot process. But if I restart the system ...
1
vote
1answer
339 views

Terminal 'last' command doesn't display login history

The last command in Terminal (on Mac OS X 10.11.2) is supposed to display a list of login history. However, when I type it in, all I get is user$ last wtmp begins Mon Jan 11 13:17 user$ last user ...
0
votes
1answer
18 views

Unix shell: Multi-level sort in opposite directions

I have a directory full of plain text files that have tags on the first line, and I want to get a list of the tags and their frequency. I've extracted the tags and sorted them into a big list; let's ...
1
vote
1answer
52 views

how to “trace” a program such as shell?

I understand that dash is a "model" shell - it was written recently and well and it only implements what is required of POSIX shell. I looked at the dash source code to understand how "tracing" of a ...
0
votes
2answers
129 views

How to get HTML file as a content to mail (shell script)

I am new to shell script, I have an HTML file which contains table data. Now I need to send this file to mail. mail -s "test" abc.com <test.html Currently I am getting the raw HTML code for the ...
1
vote
3answers
71 views

What is difference between command prompt started via start menu or directly from explorer?

In windows, we can start command line via start menu [start menu >> All Programs >> Accessories >> 'Command Prompt' or just type in cmd.exe start edit box for that matter] The 2nd way is directly ...
1
vote
2answers
44 views

Pass all *.txt files to a Python script in parallel

I have a Python script that takes a .txt file and does something with it. I need a Linux shell command that will search for .txt files throughout the system and pass the .txt files to my Python script....
0
votes
1answer
33 views

In Shell, dot in string cause -eq operation fail with error: syntax error: operand expected (error token is “\.test”)

This works fine: if [[ "test" -eq "test" ]] then echo "test compare" fi But it fails if I add a dot if [[ ".test" -eq ".test" ]] then echo "test compare" fi syntax error: operand ...
1
vote
1answer
17 views

How can I direct my output to screen and to file simultaneously?

Linux, (Ubuntu) here. Should be effective every time I open a new terminal. Output to file should contain all messages including errors and warnings, should be the same as shown in the screen. Can I ...
3
votes
2answers
73 views

Linux whois over https?

I am not using a VPN or other SSH/tunneling protocol. I would like to encrypt whois queries made via the terminal. It appears that using whoisin a linux terminal queries over an http connection as ...
0
votes
1answer
44 views

Open very long name file with terminal

Is there is a way to open very long name file from command Prompt in easy way ? rather than start fileName.type
0
votes
1answer
40 views

zsh: command issued gets repeated in output

I'm having an issue identical to: Repeated command in output for zsh prompt. As in, the command I execute is being repeated on the next line, and then the output of the command follows. But ...
0
votes
1answer
36 views

How to execute a shell script when system time is changed? [closed]

I want to be able to reliably run a script on system time change. I don't know much shell scripting, so was thinking of touching a file in a continuous loop and figuring out system time change using ...
9
votes
4answers
311 views

How to quickly get the previous line output in a terminal without using a mouse?

Linux (e.g. Ubuntu) terminal, is there a method to get the last line? Say I am randomly typing a td command, which has not been installed on my system, so I will get a message like below. I would like ...
1
vote
0answers
60 views

Why can I access the internet in a browser but not the terminal?

I can browse the internet using Chrome and Safari, but when I use the terminal, I can not. When I try to ssh in the terminal, I get "request timed out" and when I try to ping I get "3 packets ...
0
votes
2answers
50 views

Using a shell script: How to get the icon name (or path) of an open window in X-based window manager?

I am able to get window ids and window titles using wmctrl, but so far I haven't been able to get the path to the icon used by the window. I've tried looking at xdg utilities, but the closest was ...
0
votes
0answers
30 views

curl -X POST not working properly?

Here's what I'm running as a test and it is working: curl -X POST http://zone-h.org/notify When I run that, I get the HTML of the page returned. However, when I run this, it isn't returning the ...
2
votes
2answers
256 views

How to move files into corresponding folders which have the same name?

Example scenario: I've multiple files ending with .torrent and I would like to move them into folders which has the same name. For example given the following files: abc.torrent def.torrent some ...
0
votes
1answer
328 views

How do I replace the system shell (explorer.exe) with another process in Windows 10?

This is for Windows 10. Is there a way to replace explorer.exe with, for example, a powershell script? I'm looking to start a custom shell application without having to have explorer.exe run in ...
0
votes
1answer
60 views

ssh reverse shell permission issues

I'm taking part in a Capture the Flag (CTF) and I'm using Kali. I have access to a server (Server 1) via another server (Server 0) through which I pivoted. Now I'm tasked with setting up a reverse ...
1
vote
1answer
65 views

ConEmu / cmder last line of shell getting hidden / scrolled beneath bottom

I don't know if I've described this well, but the bottom line of the console keeps getting scrolled beneath the bottom. I imagine some setting I've tweaked caused this, but I can't figure out which ...
15
votes
4answers
2k views

dir C: vs dir C:\

I've accidentally found that if I do: dir C:\ I get a list of files that are direct children of the C: drive, in the root. However, if I do: dir C: I get a huge list of files that I'm not even ...
0
votes
1answer
11 views

npm doesn't start, nodejs-dev problems (ubuntu14)

I'm using ubuntu 14 and I installed nodejs-dev and nodejs and that's what appears me (photos below); can anyone help me to fix it? I really need it to continue with my project. I read about create a ...
1
vote
2answers
65 views

how to modify the “time offset from UTC” of files

I use stat to get information of files, I notice Access: 2013-12-28 13:12:11.244573123 +0100 Modify: 2013-11-12 22:54:42.274460079 +0200 Change: 2013-12-13 12:45:08.164394887 +0100 the +0100 +0200 ...
1
vote
1answer
78 views

Passing Env Variables to Batch File

I'm having difficulties passing a env var (declared in my .bash_profile) to a batch file script which executes a BTEQ operation (in Teradata). .bash_profile contains: export DBPASSWORD='password' ...
3
votes
2answers
51 views

Find location of shell script (or symbolic link) from shell

I'm on Ubuntu 14.04 and I have a shell script or a symbolic link (I can't remember which one - and I'm not sure how to tell what it is) called pbar that runs pianobar. So, to be explicit, from a ...
0
votes
0answers
31 views

Disable local files execution on certain drives (Windows 7)

Currently I'm running a kind of NAS based on Windows 7 Ultimate. The machine has one system disk and several data disks. I need to prevent accidental files execution on data disks so that EXE, BAT ...
0
votes
1answer
34 views

Distinguishing and Executing `set` & `env`?

What is the difference between the set and env commands? When would/should one be used as opposed to the other? How are they generally invoked? (Typical use; case scenario).
1
vote
0answers
76 views

How to restrict user's ssh to non-terminal access without changing /etc/passwd?

I have a user on my Linux system that is only allowed to use SSH to scp, sftp and rsync, but not allowed to have a shell session in a SSH session. I want to know a secure way to setup the restriction. ...
0
votes
2answers
44 views

xargs; How & When?

What exactly is xargs? How do you use it? When would it be considered pragmatic, or otherwise appropriate to do so?
0
votes
1answer
56 views

How to start a program on user login in Debian but disallow interactive shell

I want to have a user in Debian 7.x with the following restrictions: When the user logs in, a command-line program will automatically start in the user shell session. Then the program will parse the ...
1
vote
0answers
24 views

List of links that will be taken without a proxy in linux

How can I add a list of links that will be taken without a proxy in linux or another shell programm (etc. proxychains)? I need it to exclude the download proxy .avi files proxychains firefox