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

learn more… | top users | synonyms

4
votes
2answers
418 views

Mac Terminal.app: Force '^C' to be printed when editing current prompt, then aborting it

This is the opposite of Prevent “^C” from being printed when aborting editing current prompt. I'm using Bash. When I'm editing the commandline in Bash, and I hit Control-C to abort the commandline, ...
1
vote
4answers
144 views

Installing a program on Linux: providing a short command

Suppose you're distributing a program to run on Linux, call it Foo, and the program executable is called foo.exe (because it's a CLR program so it runs under Mono) and it needs a couple of DLLs in the ...
9
votes
3answers
4k views

Mouse cursor in Terminal?

I use Mac OS X Terminal.app. But the answer to this would probably apply to any typical UNIX-ish terminal emulator in a graphical environment. Question -- what do I do to: Use my mouse cursor to ...
13
votes
5answers
2k views

Finding the definition of a bash function

I work in an environment that has a lot of legacy shell script magic lying around. One thing used heavy from the command line are bash functions that get sourced from some file included from some ...
92
votes
4answers
30k views

What is the difference between shell, console, and terminal?

I'm confused with the terminology. What is the difference between shell, console, and terminal?
1
vote
4answers
119 views

Why is the output of ls is like this?

I am using Mac OS X Snow Leopard and when I type ls c * this is what I get in my terminal: clock: PSD demo.html jquery.tzineClock script.js styles.css clock2: ...
3
votes
2answers
534 views

how to google a symbol keyword like “$?” [duplicate]

Possible Duplicate: How to Google a question mark? I saw a trick in a book: In a linux shell, we can use $? to get the return value of a command. For example, after we run a command, if it ...
1
vote
1answer
410 views

environment variable issue in shell

I am using Red Hat Linux Enterprise 5. I know the theory that -- using export to set environment variable, the environment variable will apply to current and child environment, but without using ...
13
votes
4answers
10k views

Why is the size of a directory always 4096 bytes in unix?

I am sure a directory file has much less information than 4096 bytes. I know the sector size is 4096 bytes. But normal files smaller than that do exist. Why does Unix reserve 4096 bytes for each ...
2
votes
2answers
473 views

using “uniq” and ignore the first chars, instead of words

i have a list of files in a folder. the list of files is displayed using: ls now, i want to pipe that to uniq so it'll ignore the first 6 charactes before comparing. is it possible? or perhaps i ...
1
vote
3answers
3k views

How do I measure or track the progress of a command on a GNU distro?

If I run cp file1 file2 I'd like to be able to track it's progress. Is there a command I can use for this? rsync --progress has this, but is there something generic, usable for "any" command?
4
votes
1answer
3k views

Bash Shell Scripting - How to iterate through directories, and copy and rename files?

I have a directory setup as follows: /hosted/partner1/logo.png /hosted/partner2/logo.png /hosted/partner3/logo.png /hosted/partner4/logo.png /hosted/partner5/logo.png ..etc. I want to write a ...
6
votes
3answers
31k views

How can I disable the CTRL-ALT-DEL key combination completely on XP/Vista/7?

I have been googling extensively to figure this out, and nobody seems to be able to give a direct answer. Let me start by saying that I'm NOT talking about requiring CTRL-ALT-DEL to enter logon ...
0
votes
4answers
120 views

Linux standard input issue

I am new to Linux. And I am using Red Hat Enterprise Version 5. There is a ruby program which use standard input as its input (e.g. the Ruby program process input from standard input). I think ...
4
votes
2answers
10k views

How can I sort ls by owner and group?

How can I list directories with ls and sort them by their owner and group?
3
votes
1answer
4k views

Selectively delete entries from Windows 7 autocomplete history dropdown box

Random question, and I'm sure it has a very simple answer, if not already asked and answered in some shape or form. How do you selectively delete entries from the autocomplete history dropdown ...
11
votes
2answers
13k views

How to calculate a relative path from two absolute paths in Linux shell?

We have two paths. First one is directory, second either dir or file. /a/b/c and /a/d/e.txt Relative path from first path to second will be: ../../d/e.txt How to calculate that in Linux terminal? ...
8
votes
2answers
7k views

Indicating end of Standard Input

How does one indicate that one has finished entering test in stdin? For example, let's say that I wish to encrypt 'blue' using MD5 (I know MD5 is unsecure, but just for this example). I tried user$ ...
23
votes
4answers
5k views

How do you run the previous command in emacs shell?

I am in terminal mode on Ubuntu, and I'm running emacs with 2 buffers open, one is a ruby file, and the other is a shell (opened by typing M-x shell ), and when I switch to the shell buffer, I want to ...
4
votes
3answers
687 views

linux shell, keep task alive for specified time

I am looking for a tool to keep a task alive (restarting if necessary) for a specified amount of time (in seconds), and then kill it and stop. For example: keep_for 3600 rsync foo bar:faz should for ...
1
vote
1answer
7k views

What are the icons contained in the Windows 7 shell32.dll

I wanted to change the icon used for a Custom Library I've created in Windows 7. I found a great article How to Customize the Library Icons in Windows 7 which describes exactly how to do that. ...
1
vote
1answer
1k views

how in unix enter folder with whitespace in name

as in topic. How I can do that?
7
votes
3answers
23k views

How to delete files on the command line with regular expressions?

Lets say I have 20 files named FOOXX, where XX is the number of the file, eg 01, 02 etc. At the moment, if I want to delete all files lower than the number 10, this is easy and I just use a wildcard, ...
30
votes
4answers
14k views

How to: Unlimited Bash/shell history?

Is there a way to define an unlimited history in Bash ?
7
votes
4answers
280 views

What to use for Shell Access? [closed]

I just purchased a virtual dedicated server-plan that comes with shell access. It's been a while since I've actually used shell access remotely, so I'm a bit behind the times. Years ago I used PuTTY, ...
5
votes
3answers
801 views

Ctrl-C behavior in gnome-terminal

I have installed Ubuntu 10.04. It works fine, but when I press Ctrl-C in gnome-terminal I get: user@desktop:~$ ^C user@desktop:~$ ^C user@desktop:~$ In Ubuntu 9.04 (I did have it before) it was so: ...
2
votes
1answer
437 views

Moving a process from a shell to another? [duplicate]

Possible Duplicate: Screen a running process Is it possible to move a process from one shell to another? Ex: I have launched a process in some shell, and I decide I'd like to move it to my ...
0
votes
2answers
2k views

Can I use REG_EXPAND_SZ for the locations of shell folders instead of REG_SZ

I'm working on re-arranging a number of the shell folders in windows 7 to utilize Dropbox to keep a set of machines in sync. I'd like to create a .reg file which I can use to update the locations of ...
3
votes
1answer
2k views

Install a Program from ZIP File on Ubuntu Not Found Using Aptitude

I have a specific program that I use often on Windows and Mac, but today need to install it on a Linux machine. I downloaded the ZIP file from the vendors website, unzipped it to the Desktop and now ...
3
votes
4answers
1k views

Batch deletion of smaller files from group of files via unix command line

I have a large number (more than 400) of directories full of photos. What I want to do is to keep the larger sizes of these photos. Each directory has 31 to 66 files in it. Each directory has ...
4
votes
2answers
908 views

Execute a shell script when growl notification is shown

How do you execute a shell script whenever a Growl notification is shown? And make it application specific. For instance, run a the shell script say "You have new mail" whenever a growlMail ...
3
votes
4answers
2k views

How to get the shortest string in a text file with shell

Assume I have a text file as below abcd aaaaaaa gfgk hahahahahahhahh gf Then gf would be returned.Any good ideas?
3
votes
5answers
2k views

Mac Remote Shell

I am trying to create a remote shell on OS X with NC. I tried nc -l 1337 -e /bin/bash but it seems that the Mac version of NC does not support the -e option. Does anyone know how I can achieve a ...
1
vote
1answer
323 views

Shell function parameter

Is there a way to declare and pass parameters for shell functions, like so ? function msg( m ) { read -p "Task #" + m + "done. Press any key to continue }
4
votes
3answers
1k views

How can I invoke a function in bash shell script

I just wonder the distinction calling the function between $(one_function) and one_function in bash shell script. When I set the variable PS1 in ~/.bashrc, I can't invoke the function by one_func ...
6
votes
1answer
1k views

Mapping a Piped Shell Command in Vim

In a previous question I asked about outputting evaluated code to a new window in MacVim. I got a great solution, but it presented another question: How can I map a key command in my .vimrc that ...
10
votes
5answers
537 views

What's the difference between filename and ./filename in Linux

What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?
11
votes
3answers
14k views

TortoiseSVN overlay icons do not appear when installed by a different user account?

I've installed TortoiseSVN on my work Windows XP machine as the administrator. When I login in as a standard user my working copies do not display the overlay icons in Windows Explorer. I found this ...
7
votes
1answer
21k views

HOSTNAME environment variable on Linux

On my Linux box (Gentoo Linux 2.6.31 to be specific) I have noticed that the HOSTNAME environment variable is available in my shell, but not in scripts. For example, $ echo $HOSTNAME returns ...
1
vote
6answers
994 views

Need a Linux command that takes much time

Don't ask why, but I would like to know a linux command, besides "la -laR", since that could not take that long according to where you are in the folder structure, that takes much time to complete.
3
votes
3answers
576 views

How to add to windows contextual menu Open Command Prompt (Shell)

Recently I worked under linux and there is a feature that I like very much. I can open a shell by making right click inside the window and choosing a corresponding option from menu. Is there a way to ...
6
votes
4answers
7k views

double-click to run .sh file

GUI: I changed the permissions of an sh file, so that I can read, write and execute it. I double-clicked it, selected run in Shell / terminal (whichever appears in english), but it didn't run. I ...
1
vote
2answers
2k views

Setting default working directory/drive in Emacs shell on Windows

how can I change a default working directory/drive for shell in Emacs (on Windows)? Normally, shell starts in the same directory as the file in current buffer. However, when my current file is on D: ...
1
vote
1answer
405 views

Groff ignores line breaks from my shell

I've been using groff to make ps files for printing with the -man flag. If I want to convert anything else such as a header file or just the output from ls -l or other program the line breaks are ...
2
votes
5answers
5k views

rename file names from lower case to upper case

I have about 2k of file that are currently in lower case like: file_one.cfr file_two.cfr .... I am searching for a fast way to rename them to upper case so they would be like; FILE_ONE.cfr ...
1
vote
3answers
6k views

Script to Auto delete files older than a few minutes in ubuntu

is there a shell script out there that deletes all files in a folder that are older than x minutes?
4
votes
2answers
3k views

ssh, “Last Login”, `last` and OS X

I have hit the googles as much as I can on this, being specific to OS X, I am not finding an answer. Nothing is wrong, but curiosity levels are high. $ssh foobar@lan-connection.local Password: Last ...
2
votes
1answer
82 views

saving the results of the time command while discarding the results of the command being timed (unix)

I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't ...
1
vote
1answer
311 views

ksh93 as default shell via ssh

I'm a big fan of ksh93. My hosts' shell account doesn't allow me to configure .login, .profile or chsh to change my default shell. As it is, I am dropped into jailshell-3.2 and I have to invoke ...
24
votes
3answers
17k views

What are the differences between fish and zsh? [closed]

I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too. Both seem very close in term of ...