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

learn more… | top users | synonyms

1
vote
1answer
21 views

Windows 7 system resource as folder name

I hope it is not a stupid question, but is it possible to set a folder name to a system32.dll localised string resource? I can set the icon easily on the properties window (eg. from imageres.dll), but ...
1
vote
1answer
30 views

Can't find the good Cygwin shell executable

I am working on Windows 7 and I need Cygwin for my project. I am trying to launch the Cygwin terminal from a Java programm and then write command lines but my problem is that I can't find the right ...
0
votes
0answers
8 views

Running a slideshow on Ubuntu and and nfs

Seen this question and answer. I need to run a slideshow whose images are hosted on an nfs. Would this snippet of code while true ; do for i in * ; do cp "$i" ~/slideshow.jpg ; echo $i ; sleep 5 ; ...
2
votes
3answers
2k views

Encrypting to standard output with gnupg

I'm trying to encrypt something with gpg -a and return the result to standard out rather than a file. According to the manual, it should be sufficient to omit an --output flag, but that doesn't seem ...
1
vote
1answer
22 views

Some characters in zsh don't show until the key is released

When inputting specific characters in zsh shell (in my case e and ;) they don't show up immediately after pressing the key. Instead they only show up a short time after releasing the key. When these ...
0
votes
1answer
36 views

How to use custom shell on windows 7 when connected remotely via thin client

We have a Win 7 PC that runs software within a custom shell. This shell blocks users from the operating system depending on who is logged in. When no one is logged on, the OS is inaccessible. This ...
49
votes
6answers
23k views

How can I make tmux use my default shell?

On a new setup, tmux is using bash instead of my default (zsh). How can I force it to use zsh?
0
votes
0answers
25 views

Multiple replace - using sed or awk

I have a code snippet like below CREATE TABLE TABLE1( ID integer NOT NULL, ROW_CREATED varchar (26) NULL, BATCH_LOG_ID integer NULL, TRANSACTION_TYPE varchar(5) NULL, PARTITION_COL integer ...
3
votes
1answer
186 views

one sudo for multiple terminals

Sudo root permissions are given for specific time, but only for one terminal. If I want to use sudo in another terminal in that time period, I have to type password again. How to force sudo to works ...
0
votes
4answers
80 views

While loop Bash script that outputs how many users use a certain shell

So I am stuck on trying to create a bash script while loop function that takes the input from /etc/passwd and outputs how many of users use bash, nolongin, csh, and ksh. I believe I am supposed to ...
86
votes
2answers
77k views

How do I change my default shell from bash to zsh?

I want to change my shell from the default bash shell to zsh on my Amazon EC2 instances. How do I go about doing it? Thanks!
3
votes
6answers
10k views

Is it possible to run a program through FTP prompt?

I'm relatively new to Unix or shell scripting (a total novice to speak the truth), here is the deal: I have BI software that runs on a remote UNIX server. Through SAS client on Windows i run some ...
1
vote
1answer
50 views

The application “SomeApp.app” can’t be opened

Problem: after downloading an application in OS X Yosemite (10.10.x) trying to open the application (either from the command-line or by double-clicking the application) produces an "The application ...
15
votes
7answers
7k views

How to retrieve the absolute path of an arbitrary file from the OS X

I'm looking for a simple command that can be used within Bash to find the absolute and canonicalized path to a file on an OS X (similar to `readlink -f' under Linux). The following sample bash ...
2
votes
0answers
19 views

Can one start shell from save file dialog

Using ubuntu. If one tries to print to a file, the save dialog opens. Is there a way one can execute the shell (or terminal) from the save file dialog file name entry box?
5
votes
2answers
2k views

Delete all files older than X days

So I have a cron setup to make backups of a folder into a tarball every hour. I would like to add into the shell script that I'm using the ability to have files deleted automagically after about three ...
6
votes
3answers
5k views

How do I set my shell in Mac OS X?

I know I can set "Shells open with" in the Terminal preferences, but I'm curious if there's any system-wide way of setting this (similar to updating /etc/passwd in some Unixes).
1
vote
1answer
34 views

shell: “can't shift that many” error

The following script works fine in one of my machines, printing 1 then 2: #!/bin/sh echo "1" shift echo "2" On another machine, however, it produces the following output: 1 ./script.sh: 4: shift: ...
2
votes
1answer
4k views

How to zip multiple files into separate archives?

I admit this question was asked here before: Like Zip into separate files where the person who asked didn't specify the OS he used and received no answers. I need to separate a huge directory ...
3
votes
3answers
7k views

How can I add a timestamp to the end of a cron job's output file name?

I want to track each crontab output to separated file. Normally, I use this as crontab entry: 1 * * * * root php /mix/dostuff.php > /tmp/dostuff.txt Now, I want to make it to write ...
1
vote
0answers
22 views

monitor command outputs in separate windows within a terminal

For a list of input text, I want to execute a repetitive command using each element from the list. In addition I also need to monitor the results of each of these commands in parallel. So I am looking ...
0
votes
1answer
38 views

How to run a script on ssh login and run another script after the first terminates?

I'm trying to run a script/shell just after I login via ssh to my host with a "guestUser" the mission of this user is to connect to another remote host via ssh, I've created this user on my host: ...
0
votes
1answer
60 views

Output of the ps command and understanding the flags

Ubuntu 12.04 LTS using bash. I tried running the ps command from a Java program using the Runtime and got some unexpected output. Upon closer inspection I realized that it was the output of: ps ...
0
votes
1answer
39 views

How can something like the “passwd” file contain a shell?

I was doing some reading, and in Jon Erickson’s “Hacking, 2nd Edition: The Art of Exploitation” on page 89 I read that: passwd file contains account information for every user on the system, ...
2
votes
2answers
38 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
1answer
27 views

How to create a command shortcut in BASH or ZSHRC shells?

I know how to create an alias or a PATH however those are both used to navigate folders. How would you create a shortcut to say quickly type the following commands every time? alog = tail -f ...
151
votes
7answers
124k views

What does 'source' do?

$ whatis source source: nothing appropriate. $ man source No manual entry for source $ source bash: source: filename argument required source: usage: source filename [arguments] It exists, and it is ...
0
votes
1answer
38 views

How to “sort” .torrent files by tracker?

I have a directory with a lot of .torrent files, and I want to get only the one with specific tracker(s). Is there a way to find them? The only way I've found so far is to add them all in a ...
1
vote
2answers
37 views

ZSH PS1 adding spacing when tabbing

I'm having an issue with zsh/oh-my-zsh with my custom PS1 prompt (that I brought across from bash). When I use the built-in zsh/oh-my-zsh prompt and tab for auto-completion, this works as expected. ...
0
votes
1answer
32 views

Get the Group name which has GID=0

I wanted to write a shell script in which it needs to give the group name whose GID=0.I used awk command like this, awk -F ':' {$3==0} /etc/group | cut -d ':' -f1 It works fine in redhat,aix.But ...
0
votes
0answers
20 views

shell script to generate a log file for VM Backups

we are using PHD virtual backup to trigger backups for VMs and now i want to generate a report of all VMs in a file consisting of VM Name, Date and Backup Time and mail it to my ID at particular ...
1
vote
1answer
127 views

Remote SSH Commands - bash bind warning: line editing not enabled

I am using bash 4.3.11(1) and have the following history plugin installed (via .bash_it): # enter a few characters and press UpArrow/DownArrow # to search backwards/forwards through the history bind ...
2
votes
1answer
144 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
2
votes
2answers
75 views

Set urxvt shell without chsh?

I want to use bash as my default shell (so that it's simpler in tty) but I want to use zsh when I'm in X using urxvt. Is there a way to do this?
1
vote
1answer
12 views

Why is the exec command used for file descriptor redirection?

In UNIX shells like Bash and Korn shell exec is used for two specific uses. Its use to replace the current program with another, as in exec prog is understandable. The name exec is a contraction ...
30
votes
5answers
1k views

Deleting millions of files

I had a dir fill up with millions of gif images. Too many for rm command. I have been trying the find command like this: find . -name "*.gif" -print0 | xargs -0 rm Problem is, it bogs down my ...
1
vote
0answers
28 views

Port forwarding between two different networks [closed]

I have three Linux computers - A, B, and C. I have a TCP server that runs on C. B and C share same network and B and A share the same network. I want to send commands (and receive results) from A to ...
0
votes
3answers
29 views

How do I move files from many child directories into my root directory?

I'm using bash on Mac 10.9.5. I have PDF files in many directories, all one level from the root ... Dir_1/abc.PDF Dir_2/def.PDF Dir_3/ghi.PDF Dir_3/jkl.PDF ... How do I write a shell command to ...
4
votes
6answers
2k views

loading local shell aliases to ssh session dynamicaly

When I log in to some machine using ssh I wish my aliases and functions are there. In other words, log in to some machine I wish I can use my command shortcuts. I need it be dynamic, every time I'm ...
0
votes
1answer
23 views

how to add all the integers between two lines with a pattern and print

I have an input file (sample.txt) Sat 02/28/2015__19:32:37.63 262,404 K 100,964 K 112,052 K 124,628 K Sat 02/28/2015__19:37:38.41 262,408 K 100,964 K 112,056 K Sun ...
0
votes
1answer
14 views

What is KNOPPIX shell's start-up file?

I'm trying to install virtualenvwrapper and I got to change the settings of my shell's start-up file (like .bashrc, .zhrc, .profile, etc) to write this: export WORKON_HOME=$HOME/.virtualenvs export ...
2
votes
4answers
120 views

Prevent cat from opening a binary file

Is there a way to prevent or prompt you when trying to cat binary files? Oftentimes I need to work with log files or data files, some of which are text and others not. It's easy to get mixed up, and ...
1
vote
0answers
27 views

How to show git branch in Emacs shell

How can I show the current git branch as part of the Emacs shell prompt? For example, I have this in my ~/.bash_profile (I'm on Mac OSX 10.9 Terminal): parse_git_branch() { git branch 2> ...
0
votes
1answer
100 views

How to run pip in non-interactive mode?

Most of tools I'm using have some mode (often ON by default) where they ask me zero questions while running the command. apt-get is an example close to pip. There's -y option which makes it ...
2
votes
2answers
93 views

What is the equivalent of root in Windows 8.1, and how can I open a shell in that context? [duplicate]

I've heard the equivalent of root is the "SYSTEM" account. But I used a tool called "RunAsSystem" to open a shell as SYSTEM, and I'm still getting "access denied" errors even though I know the files ...
0
votes
0answers
18 views

Wget which stops when it has a download limit

I have over 200 wget in screens on my server. I set a download limit in each low wget: --limit-rate=1K. The only problem is that after one hundred seconds, he considers as a finished one, so this ...
1
vote
0answers
30 views

Starting Zsh in ConEmu in specified directory

ConEmu runs zsh under CygWin fine. I want to add a right click option to explorer to "Start ConEmu With CygWin Zsh In This Diretory" ConEmu provides an Integration settings page to set explorer ...
1
vote
1answer
86 views

tmux' “run-shell” blocks for background processes

I'm using tmux version 1.9a and I noticed that run-shell blocks using of any prefix-key commands until the command terminates. To reproduce this just execute run-shell "sleep 10" and try to ...
5
votes
2answers
228 views

What's the differences between all the shells, zsh, bash, csh…, why are there so many? [closed]

My understanding of shell is an interpreter between me and the OS. So it will translate my command and call the right program to perform it. For this simple task, why there're so many shells existing? ...