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

learn more… | top users | synonyms

36
votes
4answers
9k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen -- if there is a reason. Dollar just seems a little unexpected. A > would have been ...
14
votes
3answers
7k views

How to remove shell integration of Notepad++?

I need to remove the annoying shell integration of Notepad++. How do I do that, please?
1
vote
1answer
188 views

history file grows indefinitely

I believe I get the same problem as this guy. I'm on AIX, with tcsh 6.12.00 After (probably) a bad logout, the history file exponentially grown, until the quota stopped it (and when the quota was ...
2
votes
5answers
5k views

How to set permissions for folder in Unix/Linux Ubuntu

This is not necessarily direct computer science question but its closely related. Is there any way to do this. I am using Z Shell zsh. I want to set up so whenever i am in folder ~/blah ...
10
votes
4answers
10k views

How to diff directories for different files, but not line-by-line

I want to see, recursively, files that are different in two directories. Diff can do this, but it shows me the line-by-line differences, which I don't want. Is there a tool that does this, or a way to ...
9
votes
3answers
2k views

Why does less tail mode stop working?

Using the less command on linux in tail mode (F command or less -f) consistently stops working on certain machines and/or certain files. New changes simply stop showing up. I know I've fixed this ...
2
votes
2answers
4k views

How to abort robocopy on first error

When using robocopy windows utility, what flags do I set so that robocopy aborts on the very first error it sees, similar to xcopy /dry command? I need to mirror two dirs, and on occasion some files ...
16
votes
3answers
5k views

Use GNU screen as login “shell”

What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else? I see the most common recommendation is to put exec screen in your regular ...
5
votes
3answers
1k views

Launching a 32-bit explorer on Windows 7 64 bit

I'm trying to get shell extenions (e.g. unlocker) to work on Windows 7 64 bit. I found this post about launching it on Vista 64bit, which doesn't seem to work on Windows 7. There's also this old post, ...
1
vote
1answer
133 views

emacs -nw 8 bit meta

I am trying to set console emacs to use 8-bit meta rather than interpreting it as a character. The reason for this is so I can use meta as a modifier in Vim for my own keybindings. So setting xterm to ...
10
votes
3answers
8k views

What's the difference between /etc/bash.bashrc and ~/.bashrc? Which one should I use?

When should I use each of the two .bashrc files to set my aliases, prompt, etc?
0
votes
2answers
3k views

Network Icon not visible on Windows XP

The network icon for my Local Area Connection has suddenly disappeared. I am using Windows XP Service Pack 2. Already tried: Open the properties window for the connection from the "Network ...
4
votes
3answers
4k 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).
4
votes
2answers
3k views

Ctrl-e and Ctrl-a not working on Ubuntu Hardy?

I use a Mac, so I don't have Home and End keys on my keyboard. I also SSH to Linux servers quite a bit. I've found that when I SSH to an Ubuntu Linux server running Jaunty I can use the readline ...
11
votes
1answer
2k views

Vim Ignores Aliases

If I map a command in vim using something like map <f4> :! pdflatex %<cr> Vim will ignore my alias for pdflatex (something like alias pdflatex='pdflatex --temp-dir=something'). Is it ...
2
votes
2answers
3k views

Is it possible to access the shell (Darwin) on an iPhone?

In order to write some little script for example.
0
votes
1answer
555 views

Replace filename with filepath with sed

I want to replace the string /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.3.99/lib/cucumber.rb with the string /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.3.99/lib/ on the command line, probably ...
1
vote
7answers
2k views

Why would anybody replace the Windows Shell?

I'm using Windows 7, with the default Windows Shell (Aero). What's the benefit on switching to another Shell (such as, say, KDE4) ?
94
votes
7answers
74k 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 ...
20
votes
4answers
12k views

Looping Through Subdirectories and Running a Command in Each

I have a set of repositories sorted into directories based on their VCS (Git, Mercurial, SVN). With Subversion I was able to run svn update * in the parent directory and it would loop through each ...
3
votes
3answers
970 views

How to uninstall preinstalled UNIX software on Mac OS X?

Hey i want to uninstall some applications shipped with Mac OS that are a part of UNIX. My plan is to uninstall most of the default stuff to install it via Macports. That would make upgrading, ...
0
votes
2answers
300 views

How do I access a directory by timestamp?

I have a set of directories on my linux box that have names like this: bulk-load_20090918-162100 The latter part is a timestamp. Is there any way that I can access the directory with the greatest ...
3
votes
1answer
4k views

OS X (Unix) shell command: possible to get last opened date of file?

when you use the following command find /Users/someUser/someFolder/* -type f -mtime +90 you'll get all the files that have a modification date that is bigger than 90 days. If you open however the ...
5
votes
19answers
1k views

Useful Linux commands for programmers?

I am taking a test soon and I would like to know useful commands on Linux for a programmer. Some examples are string, strace, top, free, df, mount, cat, head, tail, whoami, touch. What are others? I ...
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"?
1
vote
1answer
501 views

What chsh did when I type `chsh -s SHELL` and how to go back to previous SHELL?

I have mistakenly setting my user login shell to some unknown directory:([1]. Now, I can't login to this user. Every time I try to ssh, it always failed as if I enter the wrong password. I try to ...
3
votes
2answers
6k 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 ...
0
votes
1answer
2k views

What's the best way to convert this complex “takeown” command into a shutdown script?

I found this command here. The command is structured as a registry modification that will add a "Take Ownership" entry in the standard Windows Explorer file/directory context menu. I can see where ...
69
votes
11answers
42k views

How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken. If I could at ...
8
votes
9answers
1k views

Linux & Shell - Is Shell a must?

A total newbie question. Why do we need a shell in Linux? As an example when I type - find . -name xy* - I was told that the shell takes this input and calls the find command (making sure the wild ...
0
votes
2answers
2k views

how do I copy files from a remote host to my computer?

I am trying to use the following command: $ scp remoteusername@host:$HOME/fileiwanttocopy /my/local/comp I woould like for home to be evaluated on the remote host instead of my computer (which it ...
3
votes
3answers
1k views

Custom colors for shell

How do you customise the default colours in the shell? Say I want to make the standard cyan, magenta and yellow slightly lighter. There is a method shown here for OS X Terminal using drag and drop ...
25
votes
6answers
66k views

looping through `ls` results in bash shell script

Does any one have a template shell script for doing something with ls for a list of directory names and looping through each one and doing something? I'm planning to do ls -1d */ to get the list of ...
0
votes
2answers
468 views

Why does my shell not accept shortcuts in my remote AIX session?

I'm logging into an AIX 5.3 Machine with putty via SSH. When I press TAB it will actually insert a TAB instead of trying to complete a statement, up and down keys don't cycle through history but ...
1
vote
2answers
59 views

Remote execution stops when local computer boots

When I run a process on a remote Linux machine, the process stops if the connection is terminated for some cause. This behavior is reasonable, because otherwise irrelevant processes would keep running ...
9
votes
1answer
2k views

How do I make OS X set the terminal title back to the original title when coming back from ssh?

Starting on OS X, I ssh into foo (a Linux box). My terminal title changes to foo. I then ssh into bar (another Linux box). My terminal title changes to bar. I log out of bar. My terminal title ...
19
votes
3answers
7k views

Screen a running process

Sometimes I forget to run a program under a screen session and can't stop it in the middle, and I know it's going to take long. Is there a way to screen an already running process without restarting ...
4
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 ...
0
votes
1answer
191 views

Why terminal shows “/home/igoru /etc/bash_completion” every time I open it?

I've added some lines to ~/.bash_aliases yesterday... And today my gnome-terminal started showing me this expression in the beginning, just before the prompt. /home/igoru /etc/bash_completion ...
1
vote
2answers
82 views

Error message shows up in terminal

Every time I fire up a terminal window, I get the following error message: bash: exxport: command not found I know I misspelled aa symlink somewhere, but I can't find it. Is there any way to ...
25
votes
7answers
59k views

Copy directory contents using 'cp' command

How do you copy all the contents of one directory into another? For example: $ cd /home/newuser $ cp -a /backup/olduser/* . The problem with the above is that the globing pattern '*' matches the ...
2
votes
2answers
246 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 ...
8
votes
4answers
1k views

Bash Shell Tutorials [closed]

What are some good bash tutorials? I would like to learn more about the bash shells commands and how to use them.
10
votes
8answers
2k views

Mass renaming, *nix version

I was looking for a way to rename a huge number of similarly-named files, much like this one (a Windows-related question) except that I'm using *nix (Ubuntu and FreeBSD, separately). Just to sum up, ...
6
votes
3answers
9k views

How to join files on the command line without creating temp files?

I have two files in a Linux / Bash environment: # Example data $ cat abc 2 a 1 b 3 c $ cat bcd 5 c 2 b 1 d I'm trying to join the two files on the first column. ...
1
vote
2answers
127 views

Linux redirection question

What does the following do on Linux? cat <> FIFO | Where FIFO is a FIFO created in the current directory.
3
votes
4answers
2k views

need to know the use of rm -f in unix and how to implement in dos

rm -f /obi/u01/informatica/v711/pmserver/SrcFiles/coe/aone/AccessOne_Daily_Input.xml What is its use in unix and its possible implementation in dos?
12
votes
7answers
19k views

Make ls sort by file type (then name)

By default the ls command sorts just by filename, but I want directories to appear before other file types. I might even want files to be sorted by extension, like the way Windows explorer sorts by ...
27
votes
4answers
2k views

Difference between “a=b” and “export a=b” in bash

What's the difference between: a=b and export a=b In bash? I understand that they both define environment variables, but I don't fully understand the difference.
4
votes
2answers
218 views

shell dotfiles and *rcs: what's a sane setup?

A bash user will eventually end up with .bashrc, .bash_profile, .profile, and maybe some more. Now, each file gets loaded unders particular situations, and it all leads to confusion and frustration. ...