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

learn more… | top users | synonyms

6
votes
4answers
2k views

Alternative console host for Windows 7/Windows Server 2008

I am often frustrated with the Windows' console host application, especially how clumsily the clipboard works, no-automatic-width issues etc. I would like to know if there is a way to replace the ...
0
votes
2answers
537 views

Windows 7 CD Command only echoes directory

The path for every new instance of the shell starts in my user directory (C:\Users\user). Within this directory or rather drive (in this case C:) I can't use the cd command as I'm used to - it only ...
1
vote
2answers
339 views

“which” Program Requires Shell Refresh to See Newly Installed Programs?

Why does the Linux program which require you to refresh the shell (e.g. type tcsh in the terminal) to see new programs installed in your path?? I was baffled why I couldn't access a program, which ...
1
vote
1answer
246 views

How to colour folders controlled by SVN in terminal?

Is there a way to get the SVN controlled folders list with different colors in the terminal? Like an alias for "ls". So when we type "ls", all the folders with an ".svn" sub-folder should be yellow ...
0
votes
2answers
664 views

problems about the mail command in linux

I want to send email with mail command, but it didn't work. I use the following command : mail -v -s "test" jidalyg_8711@163.com then the terminal will always wait and no response. Also, there is ...
-2
votes
1answer
2k views

Explain the behavior of the following shell script [closed]

Explain the behavior of the following shell script: $ cat quote_demo twoliner="This is line 1. This is line 2." echo "$twoliner" echo $twoliner How many arguments does each echo command see in ...
1
vote
3answers
2k views

in shell how can I tell the difference between a directory and a file

How can I tell which ones are directories in ls output? It seems ls doesn't differentiate directories and files. I know I can use cd to test but is there a way to make it more obvious when I ls a pth? ...
1
vote
1answer
116 views

How to write a ~/.firefoxrc?

I want firefox sources ~/.firefoxrc automatically when I open a webpage. ~/.firefoxrc contains several javascript functions: Array.prototype.sum = function(){ for(var ...
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 ...
3
votes
4answers
8k views

How do you run Vim in Windows?

I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried ...
0
votes
3answers
450 views

Parse and remove parts of strings between delimiters

I would like to go through a file and remove certain sequences in between delimiters. For example drw---- 00000000 11111111 0 ./a/ drw---- 00000000 11111111 0 ./b/ d------ 00000000 ...
0
votes
1answer
555 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 ...
4
votes
3answers
698 views

Diff 2 files while ignoring parts of lines

I would like to diff a file system. Currently my bash script prints out the file system recursively into a file (ls -l -R) and diffs it with an expected output. An example for a line in this file ...
1
vote
1answer
813 views

Fedora: “Login Incorrect”

I've just set up a minimal install on my netbook (the default was too resource hungry, so I figured I'd customize the install and learn something about linux at the same time!) No problems logging in ...
1
vote
1answer
124 views

Unpack this directory into your PYTHONPATH?

I want to install qt4reactor so I went to the github page, it says: Unpack this directory into your PYTHONPATH I don't know what that means. I unziped the file and I tried to add the path to ...
1
vote
2answers
244 views

Utility for creating symlink to directory tree

I remember that there is an utility for GNU/Linux, that given some directory, builds the same directory hierarchy, but with all regular files replaced by symlinks to the corresponding ones. I can't ...
2
votes
2answers
2k views

A Unix shell command alternative to echo

I'm trying to output string literals to a file. So far I've been trying to use the echo command, but unfortunately I've discovered it's impossible to output '-n', '-e' or '-E' (at least not without ...
0
votes
2answers
3k views

change from bash shell prompt to regular shell prompt on centos

my centos environment has just become bash shell prompt: -bash-3.2# how do I change it back to the usual # prompt? what places should I check for possibly modifications? Update: I was not clear ...
0
votes
1answer
161 views

MinGW interactive shell?

I see that MinGW shell launches with sh --login -i Another way to launch would be like this sh --login I know that -i is for interactive shell, but I am not seeing a difference between the two ...
1
vote
1answer
101 views

how can I invoke the last 3 commands in shell history

Lets say my last 3 commands were: % rm foo.out % myprog > foo.out % cat foo.out I will like to invoke the last 3 with one stroke of the enter key, i.e. do some shell history commands which ...
0
votes
1answer
124 views

How to find files, print some standard info about those files, plus print the alpha char count of each filename?

I want something like this: find "$dir" -type f -printf '%i:<alpha_char_count_of_base_filename>:%d:%p\n' Then I want to sort first on inode number, then on alpha_char_count_of_base_filename. ...
3
votes
1answer
454 views

Bash: how to enter a subdirectory that's most recently modified?

I know I can find a directory that's most recently modified by doing ls -ltr, but the last modified item might be a file, not a directory. Secondly I still have to type the directory name. My ...
0
votes
3answers
59 views

How to make last line the first (the top) of the terminal?

I have a mac, and for improved readibility, sometimes I clear the terminal. I'd like to know if there's a shorcut to make the last line become the first of the terminal without clearing anything in ...
1
vote
3answers
2k views

On Unix, open xls file, and read the content, only the data

Does any one know how to open xls file in shell on UNIX? whether is there any tools to convert XLS to CSV?
0
votes
1answer
50 views

Is it possible to permutate shell globbing expressions?

When using normal shell globbing, * often matches files in lexicographic order. For certain reason, sometimes I don't want this behavior. Is there a way to scramble matching results so their order is ...
0
votes
1answer
359 views

trying to get .csh history via arrow keys

I was wondering if there was a easy way to get the up and down arrows to scroll command history while in .csh?I know that it is done like that in bash and sort of use to being able to work that way
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 ...
4
votes
4answers
2k views

Chmod equivalence of +x and 0755

Just curious, are these two completely equivalent? chmod +x file chmod 0755 file Thanks :-)
0
votes
1answer
36 views

Speeding up file search with a shell

Do you know any way to speed up file searching with a shell? There is a lot of possibilities: find, which, whereis, ... find seems to be the most useful, but it's very slow. Perhaps, I don't know ...
3
votes
2answers
610 views

How to list directories names but not their contents, in *N*X?

If I do a simple ls specifying a filename pattern, like ls A*, for directories that match the pattern, it will enter the directory and give the full listing, but how could I get just the listing for ...
0
votes
1answer
252 views

Can the visual bell be enabled in Cygwin?

Trying to enable the visual bell for the Cygwin shell. I am running Cygwin 1.5. I don't have speakers, and would like a visual way to be notified of command line errors. So far I have tried adding ...
1
vote
4answers
737 views

Kill program after it outputs a given line, from a shell script

Background: I am writing a test script for a piece of computational biology software. The software I am testing can take days or even weeks to run, so it has a recover functionality built in, in the ...
1
vote
3answers
2k views

Mac server default file permissions

How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there ...
3
votes
2answers
218 views

format stdout as multicolumn text

I'm trying to take some single column data and display it in a tty as columns, much like ls does. Basically, you can think of this as trying to take the output from ls -1 and make it look like the ...
1
vote
2answers
6k views

how to pass password to sudo commands?

on OSX I do sudo route delete default sudo route add default 192.168.178.1 to change my default gateway. On running a sh file with these I am asked for a password every time. Which I run as sh ...
4
votes
4answers
4k views

Print back-reference in regular expression

I was hoping for a way to make sed replace the entire line with the replacement (rather than just the match) so I could do something like this: sed -e "/$some_complex_regex_with_a_backref/\1/" and ...
1
vote
1answer
125 views

man pages don't line wrap correctly

Sometimes running man outputs badly line-wrapped text. If I run man, quit, then resize the terminal window and run man again, it formats it according to the new window width. But if I run man, resize ...
1
vote
2answers
1k views

How to use shell on WAMP

Is there a way to open shell with WAMP? I need to be able to run some UNIX commands with my local WAMP server. Cheers
0
votes
1answer
82 views

gnu `uniq -c`: display counts graphically as bars

With sort $file | uniq -c, it's possible to sum up files/input and show the number occurences like that: 13 foo 1 bar To get a better grasp of this data, I'd like to see them graphically ...
0
votes
1answer
106 views

Command history for user never using interactive shell

Can I view the history of a non-interactive user, for example, httpd? Hopefully, the answer is not specific to the shell used. I'm looking for history that could be in either bash or dash.
3
votes
1answer
393 views

zsh alias “…”

I have an ZSH alias: alias -g ...='../..' alias -g ....='../../..' When I try to cd ..., things work perfectly. I can't, however, use it in a cp command: cp .../file . fails with cp: .../file: No ...
4
votes
1answer
968 views

Difference between tmux and shell split options on iTerm2?

I currently switched to iTerm2 + VIM for my dev environment. I noticed that the last version of iTerm2 supports tmux and there were people using tmux to split the window into several sessions. I also ...
2
votes
2answers
545 views

Why does 'killall killall' not work? [duplicate]

Possible Duplicate: Unexpected killall behavior If running the command killall killall from a terminal (I used Konsole of KDE 4), it says it could not find any process. killall runs, looks ...
0
votes
4answers
1k views

ssh freezes when trying to connect to some hosts

When I try to ssh to particular machine/s in a list, The SSH command happens to be freezing. I tried out setting ssh timeout. But then also it's freezes even after the timeout. In verbose mode : ...
2
votes
2answers
1k 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
328 views

Colored man pages but git --help is not in ZSH

I have colored man pages according to: alias man="TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man" so man less looks like but git blame --help is uncolored
2
votes
2answers
789 views

Windows 8 - load shell extension immediately

I am trying to use Stardock Fences with Windows 8 and I've run into an interesting problem. For those who do not know this program - let it be just one, that modifies shell. Switching to desktop ...
3
votes
5answers
13k views

How to recover Linux from 'repair file system' error

Unfortunately my mom did something that I don't know and Linux is in command-line mode. What is the key for exiting from the shell and going to the desktop? I tried Alt + F2 Alt + F6 Ctrl + Alt + ...
1
vote
4answers
228 views

sed -e “s/-.*$//”

What does the -.*$/ in this command mean? Please help me decipher this. echo -n full | sed -e "s/-.*$//" I know what sed does and all that, I just want to know what this -.*$ part is.
0
votes
1answer
131 views

Open Firmware - RAM Size

Is there a command to get the amount of RAM in Open Firmware mode (Cmd + Alt + O + F on startup)?