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

learn more… | top users | synonyms

106
votes
6answers
100k views

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to ...
52
votes
9answers
70k views

sudo with password in one command line?

On busy days, I'd like to run $ ./configure && make && sudo make install && halt on the night and go to bed, hoping the application would automatically be installed. But ...
2
votes
1answer
605 views

How do I add “Open Folder in cmd.exe” to the shell in Windows 7?

how do I add an option to open a folder in cmd.exe to the context menu of a folder? In Windows XP this can be done by going to the folder options, clicking file types, selecting folder, pressing ...
1
vote
1answer
307 views

Automatically open README/readme/etc with less?

I come up with a solution to this problem,write a piece of script call readme who internal call the less with the current directory readme-alike txt file. Is there any software to do so?I do not want ...
1
vote
5answers
614 views

Traverse path up and check/set permissions in shell script - how?

In a given shell script I need to take a known path and check it upwards (to the file system root) for correct permissions. How would I split the path and walk upwards in a shell script (can be bash ...
2
votes
1answer
353 views

Why did shell redirection fail?

The command causing the failure, gpc xxx.pas > error.txt Because I want to upload the error message to the stackflow.com,but it turns out there is nothing in the error.txt,moreover the gpc still ...
2
votes
2answers
355 views

How to extract text from the current shell?

When I want to ask question on Linux platform, I would always need to provide the screenshot of current shell.But taking snapshot,uploading, linking costs much, is there any command to extract text ...
0
votes
2answers
264 views

When re-directing to a file in linux tcsh, how can I change the write buffer size to be larger?

In linux tcsh, if I am creating a log file like: CMD > cmd.log How can I make the write buffer, which caches the data before sending it to disk, be larger than the default? How can I buffer more ...
-1
votes
3answers
267 views

what does tail + number does? What about head

I just called this command ls -l | tail +3. Firstly, ls -s, produces 3 lines, adding piping strips first line and then prints each file names on a separate line. How does it do that? It doesn't make ...
6
votes
4answers
6k views

Unix command to list all directories larger than 10mb

Is this possible, and what would the command be?
41
votes
9answers
3k views

Why is Bash everywhere (in most if not all Linux distributions)?

Bash is used by default in every Linux distribution I have tried, over alternatives like Z shell (zsh). Is there a technical or historical reason for this?
1
vote
5answers
2k views

Recursively delete files on Windows

I need to remove all files and directories starts with ._ recursively: find . -name \._* | xargs rm How can this be done on Windows using a DOS/shell command (without Cygwin)?
3
votes
1answer
3k views

How can I clear the scrollback buffer in konsole from bash?

I'm a heavy bash user and konsole is my preferred environment. I know I can use the keyboard command ctrl+shift+x to clear the scrollback buffer, but there's certain points in my scripts where I would ...
4
votes
5answers
1k views

How to tar.gz everything under xx MB?

I'm currently using this: tar -pczf backup.tar.gz * to tar.gz everything. There are some other backups though (in other folders), these are typically the only files > 50mb. How can i exclude ...
1
vote
2answers
3k views

64 bit alternative shell

Im looking for a 64 bit, minimalistic replacement shell for Windows XP/Vista/7. Any ideas?
21
votes
7answers
88k views

How do I run the Windows 7 Explorer shell with Administrator Privileges by default?

The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process: Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the ...
0
votes
4answers
200 views

Any other bourne shell port on Linux?

I'm looking for Linux ports of historic Bourne shell versions (other than the Heirloom shell, which implements the SVR4/SVID3 level of the shell). For curiosity and research, I want to dig into the ...
4
votes
11answers
42k views

How to shut down a computer having a particular IP address?

If we have a collection of Windows and Linux computers on a LAN, is it possible to shutdown a computer having a specific IP address, using the Linux shell? Assume that I do not have ssh or telnet ...
37
votes
4answers
11k 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 ...
18
votes
3answers
9k 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
199 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 ...
12
votes
4answers
12k 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
3k 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
5k 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
6k 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
134 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 ...
13
votes
3answers
9k 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?
1
vote
0answers
4k 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 ...
5
votes
3answers
5k 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).
5
votes
2answers
4k 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
4k views

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

In order to write some little script for example.
0
votes
1answer
571 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) ?
142
votes
9answers
110k 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 ...
25
votes
4answers
15k 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
984 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
1answer
304 views

How do I access a directory with the most recent timestamp in its name?

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
521 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
7k 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 ...
79
votes
11answers
50k 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
2k 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
3k 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 ...