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

learn more… | top users | synonyms

0
votes
1answer
174 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
102 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
131 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
610 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
54 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
481 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
3k 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
905 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 ...
1
vote
1answer
324 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
1k 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
263 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
8k 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 ...
5
votes
4answers
5k 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
156 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
2k 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
91 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
107 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.
4
votes
1answer
423 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 ...
5
votes
1answer
1k 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
574 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
2k 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
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
389 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
799 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
16k 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
255 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
152 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)?
7
votes
1answer
15k views

Retrieve Linux command line history by date

I want to see what I typed on my bash command line on a certain day a week ago. Is there a way to retrieve command line history? Something like below, perhaps? > history --include-date | grep ...
1
vote
1answer
149 views

Accessing your bash profile and history anywhere - via the internet

I'm curious if anyone has tried to tackle the task of having non-sensitive parts of their bash (or other shell) profile made available anywhere they go. I worked for a company for a time that did ...
6
votes
1answer
3k views

Bind keys for scrolling pages in copy mode in tmux

I'd like to be able to map emacs keys (like C-v/M-v) for scrolling in tmux instead of default PgUp/PgDown, is that possible? Can't see that from the manual at the moment (apologies if its there, seems ...
2
votes
1answer
676 views

Replace bash shell with python program's cmdline interface

I have a program which uses python's cmd module for command line interfaces. Now I want it to run on my Linux server whenever any normal user logs in to it, in a way that user never gets the default ...
4
votes
2answers
3k views

How to properly end a KDE session from shell without root privileges

I am accessing the machine (OpenSuse 11 with KDE) over NX. I cannot use the Alt-Ctrl-Del shortcuts as it is captured by my system. The regular logoff button just ends the NX session without ending ...
0
votes
3answers
228 views

Script for Running Program from Command Line

I am new to Linux so please excuse my ignorance: On my current work machine if I type: $ matlab ...the machine is configured so that matlab is executed. I want to do the same thing for ImageJ ...
5
votes
2answers
1k views

Remove all “deleted” files in Git

Is there a better solution for removing manually-removed files from the Git repository than my current error-prone command? git status | grep deleted: | cut -d: -f2 | xargs git rm
2
votes
2answers
8k 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?
3
votes
1answer
3k views

accessing the mapped network drives using mingw shell

How to access the mapped network drives from the mingw shell? When I try cd y: or cd /y or y: All I get is No such file or directory or sh.exe y:: command not found. I am able to access the same ...
0
votes
3answers
8k views

Zipping files greater than 2GB in bash shell

I ve been trying to zip all the files in partcular directory into a single zip file and then transfer it to destination server. command i ve used is like zip -j $Zipfilename * the problem is ...
0
votes
1answer
540 views

How to find all files recursively except those in a certain directory

How can I find all files in a directory recursively, except those in the .git directory? I tried the folowing: find . \! -name ".*" but that didn't work.
2
votes
2answers
129 views

Why is a shut down performed faster when initiated from the command line?

Whenever i use a command like shutdown -s -f -t 00 I can see that the shutdown occurs faster than when I go and click the shutdown button in the Windows GUI. This scenario can be compared with my ...
1
vote
2answers
281 views

Continually compressing a stderr stream

Is there some way to continually compress the output of a program (in almost realtime)? For example I have this program that produces (a lot of) output to stderr. I want to do something like ...
2
votes
1answer
596 views

Bash alias history substitution similar to \!* in csh

My question is very similar to that of this old post. I would like to do something similar: place in an alias the last argument(s) typed on the current command line. This would be equivalent to the ...
0
votes
1answer
457 views

personal .txt archive; utf-8 or utf-16?; need chinese and scandinavian characters; performance irrelevant

So I use plain text for pretty much all information I keep. The files are (or will be) used with shell scripts, emacs, vim, terminal etc. on OSX and Linux. It would be ideal to be able to use English, ...
2
votes
2answers
1k views

Remove directories from a file with list of directories

I have a list of directories in a text file and each of them need to be deleted. How can I read in that list into the command (rm -r or rmdir)?
3
votes
4answers
492 views

Command-T for shell

I'm looking for a shell extension that allows me to do filename completion similarly to Command-T. Command-T a feature in TextMate and a plugin for Vim that allows you to select filenames by typing ...
3
votes
1answer
4k views

ssh ForceCommand vs. ProxyCommand

I need to have a group of users hop through a server ('bastion') into another machine ('dest') via ssh to commit code. Seems like my options are: tell users to use ProxyCommand in their .ssh/config ...