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
8answers
2k views

Why does “ls -a” hide some existing directory from the root user?

Today I found something really interesting (at least to me) on one of our test servers: I can change into an existing directory from my actual working directory using a relative path, but that very ...
0
votes
2answers
214 views

Putting code into registry command key

I'm trying to do what's done in this question, but I want to attach it to a context menu on Directory so I can right-click on "Flatten Folder" and have it do it for me. That is, bring all the ...
27
votes
5answers
10k views

What is the difference between bash and sh?

I see two types of code being used: #!/usr/bin/sh and: #!/user/bin/bash I searched for this online and opinions vary a lot. The explanations I saw on most websites say that sh is older than ...
10
votes
9answers
7k views

How do I copy file named starting with a dot?

I am trying to copy all files under directory A to directory B. All files under directory A are starting with dot, for example: A/.a A/.b A/.c which I found if I use: cp A/* B, always get error: ...
10
votes
3answers
2k views

How can I launch a file properties dialog from the command line?

It's simple programmatically with ShellExecute to specify the properties verb when instructing Windows to open a file, but can this be done from the command line or run box? Ideally I'd like to do ...
8
votes
6answers
4k views

Clear stdin before reading

I have the following bash script: # do some time consuming task here read -p "Give me some input: " input Now as you might have guessed, if a user presses some random keys during the "time ...
8
votes
3answers
7k views

Run a GUI app on remote computer from SSH

I want to run a GUI application on my Ubuntu computer, but it should started by a shell script on my Debian server trought SSH. Is this possible?
8
votes
3answers
819 views

`which python` points to the python I want, but `python` runs the wrong version

I want to use python24 provided by ports, so I've installed it, and python_select -s shows that the version I want is indeed selected. Running which python gives /opt/local/bin/python, and running ...
6
votes
4answers
2k views

Windows 7 - Add shell command for .png file

On Windows XP, you could go to Folder Options - File Types, select PNG, create a new action, such as this Action: Crush Application: "F:\Programs\PNGCrush\crush.bat" "%1" So you can right click on ...
6
votes
1answer
2k views

versions of netcat

I've tried the two main versions of netcat : GNU and BSD. (mine is BSD Version). On GNU version, the command $ nc -l -p 12345 works fine but with BSD, option -l (listen) can't be used in conjonction ...
5
votes
3answers
3k views

Can I use pipe output as a shell script argument?

Suppose I have a bash shell script called Myscript.sh that need on argument as input. But I want the content of the text file called text.txt to be that argument. I have tried this but it does not ...
5
votes
3answers
35k views

how can i install CentOS 6 without the gui?

i just downloaded the centos 6 live cd and i tried installing it on virtually and i am never prompted to install centos with/without gui and its all automated. what happends is after i am booted into ...
5
votes
5answers
2k views

What is the difference between “Shell” and “Terminal”?

I am fairly new to Ubuntu and I am loving it! But I don't quite understand the difference between the shell and the terminal. Can any one explain? Someone told me that a terminal is just a "tool" to ...
5
votes
6answers
6k views

Why does my LD_LIBRARY_PATH get unset launching terminal?

I have a shell script to set up some environment variables and launch whatever program I send in as an argument: export PATH=$HOME/local/bin:$PATH export ...
4
votes
4answers
2k views

Does “chmod 777 .* -R” chmod parent directories (..)?

Does "chmod 777 .* -R" chmod parent directories (..) recursively?
3
votes
3answers
3k views

How to store a Unix alias?

I know I can create an alias for untar like this alias untar=’tar -xvzf’ How do I make this persist from session to session, because it seems it is lost when I reconnect?
2
votes
0answers
98 views

Downloading and building O3D

I'm trying to get a program called O3D into my computer by following the instructions on O3D's wiki. I tried to download the project to my directory but the prompt gave me this answer: gclient is ...
2
votes
1answer
144 views

What this command :(){ :|: & };: does? [duplicate]

What does this shell command do in Linux :(){ :|: & };: How can it be used in Denial of Service attacks?
2
votes
2answers
750 views

Tool for diffing large files

When I use "diff" to find the difference between two large data files, diff A.txt B.txt > dif.info it is output: diff:memory exhausted or add the argument "-H" diff -H A.txt B.txt > ...
2
votes
2answers
6k views

How to access a shared drive from the command prompt on OS X

I have a shared drive called "music". It shows up in Finder without problems. How do I access this from the command prompt on a Mac? I can't find it anywhere – is there a way to access it?
2
votes
3answers
8k views

Is it possible to use putty as the UI for the Windows shell?

PuTTY is much better than cmd.exe. Can I use PuTTY to execute Windows commands?
2
votes
2answers
5k views

Terminal emulator with split panes for Mac OSX

I'm looking for a terminal emulator on Mac OSX with a specific feature: to be able to split the console window into multiple panes. It's a great feature of Terminator for gnome, I think this image ...
2
votes
2answers
252 views

History of commands?

Is there any way to find which commands have been executed between 2 specific dates (like 2 to 3 months period)? I can use the history command, but I have powered the system on/off. Is this ...
1
vote
2answers
389 views

run any shell script from Fish and import all exported env variables?

Is it possible somehow to import all environment variables which are exported by a subprocess started by Fish? E.g. from my Fish session, I start bash ~/.profile, which exports some variables and I ...
1
vote
2answers
1k views

Diff and ignore lines missing in one file

I want to diff two files and ignore lines that are present in one file but missing in the other. For example File1: foo bar baz bat File2: foo ball bat I'm currently running the following diff ...
1
vote
3answers
2k views

Alias to open gVim (Cream version) from Cygwin shell

I'm using the Cream version of gVim, and i'd like to make an alias to open files from a Cygwin shell in Cream. Running the gVim executable from Cygwin gives the following error (in a Windows cmd ...
1
vote
3answers
27k views

Need some help with Terminal Emulator (Android app) commands. (Similar to Linux commands)

I'm trying to follow this tutorial to install Mobile Defense as a system application on my Motorola Droid. I want to use Terminal Emulator and the commands are basically the same. The only two ...
0
votes
2answers
84 views

sum numbers in different lines in shell

i have 8000 lines similar to this <Flow flowId="1" timeFirstTxPacket="+0.0ns" timeFirstRxPacket="+924100.0ns" timeLastTxPacket="+199984927558.0ns" timeLastRxPacket="+199675473275.0ns" ...
0
votes
1answer
70 views

combining bourne shell and awk

This is my actual file WASfile #!/bin/sh sed -i '/^ *$/d' WASfile sed -i -e '/user=/,/group_1=/{w /tmp/1' -e 'd}' /home/wasdm/WASfile; Script to Add read -p "Press [Enter] to continue for ...
0
votes
2answers
290 views

Removing duplicate files, keeping only the newest file

I'm trying to clean up a photo dump folder, in which several files are duplicated but with different filenames or lost in subfolders. I've looked at tools like rmlint, duff and fdupes, but I can't ...
0
votes
1answer
588 views

“noshell” for ssh proxy users

I like to setup a special ssh user which is only allowed to tunnel web traffice through my server. I do not want to make an open proxy. This brings me to my question: Is there a "noshell" shell for ...
11
votes
2answers
12k views

Unix: How to merge two directories

Say I have two folders with various content, foo and bar. How can I merge bar into foo so that: Files in foo that are not in bar are untouched. Files in bar that are not in foo are now in foo. Files ...
8
votes
2answers
819 views

Making bash TAB completion more like cmd.exe [duplicate]

I wondered if theres a way to do rotational style completion in bash similar to the behavoir on cmd.exe, I've found it speeds me up in regard to entering commands
7
votes
4answers
1k views

BASH history truncated to 500 lines on each login

For some reason, I cannot get my system to keep my BASH history after a reboot. Here are the relevant sections of my ~/.bashrc: shopt -s histappend PROMPT_COMMAND='history -a; updateWindowTitle' ...
6
votes
2answers
2k views

re-use '~/.profile` for Fish?

(I'm talking about the shell Fish, esp. Fish's Fish.) For Bash/ZSH, I had ~/.profile with some exports, aliases and other stuff. I don't want to have a separate config for environment variables for ...
5
votes
1answer
100 views

Why there is an empty line begin with “*” in the result of history command on linux?

Today at work, I wanna know a history command which I am not very familiar with and I was sure that I just executed a little while ago. However, when I ran history on the same terminal window, I found ...
5
votes
2answers
181 views

Differences in bash scripts between $@ and $*

Which are the differences between $@ and $* ? For example I see no differences here: #! /bin/bash echo with star: $* echo with at sign: $@
5
votes
4answers
7k views

rsync using regex to include only some files

I am trying to run rsync to copy some files recursively down a path based on their file name pattern, case insensitive. This is what I have done to run rsync: $ rsync -avvz --include ='*/' ...
4
votes
3answers
4k views

What is the difference between Linux (Ubuntu) and Mac shell commands?

I use Ubuntu at work and a Mac at home. I was trying out some shell commands on my bash terminal on the Mac today but they didn't work. I was told both machines should operate UNIX commands so the ...
4
votes
3answers
6k views

What is the default terminal (shell) for Xubuntu?

What is the default terminal (shell) for Xubuntu? Does Xubuntu use the same shell as Ubuntu?
4
votes
1answer
404 views

how to copy I/O not just redirect (Windows and Linux)

I have a simple call command call calabash -D sim.xpl >test.txt 2>&1 and this redirects into test.txt, how do I do both redirect into a file and allow it to show up in the prompt? (I ...
4
votes
4answers
3k views

How do I “globalize” binaries in Linux?

For example, any binary placed in /usr/local/bin will run in any location. If I were to place binaries inside /myname/local/bin how would I be able to accomplish the same thing?
3
votes
1answer
552 views

Parse multiple HTML to text and rename as parent Directory

In a directory there are many folders .html inside, I would like all HTML parsed as new .txt with the name of the parent directory. Example1/ Index.html>Example1.txt Example2/ ...
3
votes
2answers
1k views

How to delete readonly variable in bash?

$ mySite="superuser" $ readonly mySite $ unset mySite bash: unset: mySite: cannot unset: readonly variable How can we delete mySite, as it is a readonly variable?
3
votes
1answer
691 views

How can I run an AppleScript or shell command on Mac OS X at screen unlock?

Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.
3
votes
2answers
2k views

execute command after process terminates in different shell

I am running a command that's processing some data in one shell window (let's say it has pid 200). Unfortunately I forgot to add the & to run it in the background. I need to run some analysis ...
3
votes
3answers
864 views

Which shell to use to modify/replace Windows Explorer (don’t want fancy desktop but better browsing of folders/files… similar to Classic Shell)

I do know about the existence of alternative shells such as SharpE, Emerge Desktop, Ashton Shell, BB4Win, etc... I've looked into a few of those popular/famous ones, but they all seem to be very ...
3
votes
5answers
4k views

Is it possible to open a remote terminal session on a Windows XP machine?

Remote desktop is... useable, but I'd like to get a proper remote terminal window open on the Windows XP machine, like I'm able to with Linux. A quick Google points at this, but it looks like it's ...
3
votes
2answers
104 views

Is there a specific name for the .. or . on *nix systems?

Just what it says. Do they have a name besides "those dot thingies"?
2
votes
3answers
1k views

Bash script, string not replaced correctly with escaped $ and & characters

I have created a shell script which takes a string as input. If the string contains $ or &, then I need to replace those characters with \$ and \&. I could done that with sed command. After ...