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

learn more… | top users | synonyms

12
votes
7answers
18k views

How can I list only non-empty files using ls?

How can I list (using ls) all files that are not empty (size > 0) using linux?
1
vote
2answers
51 views

Quantifying responsiveness in solaris machine

I am one of the n users of a shared unix machine. For reasons unknown, the machine is not "responsive" enough. For example, it is slow on interactive commands, it takes few noticeable moments for any ...
1
vote
2answers
951 views

meaning of ftp -s in shell scripting

can some me tell me what does s means in ftp -s (shell scripting)?
0
votes
2answers
1k views

Is it possible to open a second shell session that will remember the user, machine, and directory I am in?

I'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?
3
votes
2answers
3k views

Bash: Find folders with less than x files

How would I go about finding all the folders in a directory than contain less than x number of .flac files?
5
votes
1answer
2k views

Can I make a shell context action run as administrator?

I like to add a shell context menu for registering .dll files using the command %windir%Microsoft/Framework/v2.0.50727/regasm.exe "%1" /codebase which used to work fine in XP. However in Windows ...
8
votes
3answers
160 views

Windows 7 coming from Linux/Unix?

I've got a Windows 7 box going for my job, and most high-level computing experience is coming from shell environments in Linux. I'm completely lost in the Windows shell, and when I try to use a GUI ...
0
votes
2answers
1k views

Moving characters to the end of line (EOL) with SED

Any time the word “The” appears at the beginning of a line, I want to move it to the end of the line and capitalize the new first word in the line. For example, “The heaven” becomes “Heaven the”. I'm ...
8
votes
4answers
10k views

UNIX shell scripting: how to recursively move files up one directory?

I have a large number of small files, f, arranged in a directory structure like so: /A/B/C/f There are 11 directories at the level of A, each with about 100 directories at the level of B, each with ...
4
votes
3answers
844 views

Why is there a minus sign in “$0” on Mac?

I've been a GNU/Linux user for years, but I can't figure out how to get usable process info on Mac. I realized that $0 resolves to -bash in my login shell on Mac OS (Snow Leopard). This may break ...
3
votes
4answers
894 views

rm -rf: Unix thinks '-rf' is a file not an option

I run the following command in Terminal on my OS X Snow Leopard laptop: rm -rf /path/to/directory Normally, this deletes the directory and all contents/subdirectories. For some reason, though, it ...
1
vote
3answers
401 views

How do I stop my bash terminal from prepending parts of previous commands to my current line?

I'm using Ubuntu (10.04) with bash, and am running into an odd issue. After I use the up arrow to scroll back through my history of commands, and get back to one of the longer commands (i.e., one with ...
1
vote
2answers
953 views

Remote shell sessions logout on hibernate

I often found to close laptop to fast, with few remote ssh sessions opened. And after wakeup i found few dead-shells, witch has not been closed :/ How i can force clean exit of remote ssh-sessions on ...
3
votes
3answers
7k views

How can I exit a program in the OS X Terminal?

What is a quick way to exit a program in the OSX terminal?
2
votes
1answer
3k views

Install MatroskaProp on Windows 7 x64

To see more information in Windows Explorer property pages and menus about Matroska Video (.mkv) files, similar to what one can see when selecting native Windows media (.avi, .asf, .wmv or even just ...
18
votes
5answers
9k views

Bash/ZSH: Undoing 'disown'

Is there a way to 'reattach' a process to the shells job table after it it has been 'disowned'? Edit: $SEARCHENGINE totally fails me. Doesn't look too good.
2
votes
2answers
189 views

How to take backup of a shell?

I was working on a shell and got some weird exceptions in my program. Just as a reference, I want to save all that is there on my shell to a text file. I do not just want the command history but also ...
2
votes
8answers
2k views

Why does “ls -a” hide some existing directory from the root user?

Today I found something really interesting (at least to me) on one of our test servers: I can change into an existing directory from my actual working directory using a relative path, but that very ...
1
vote
1answer
1k views

Shell context menu option does not work when many items are selected

I added an option to register a dll silently using the right click context menu by adding the following registry key: [HKEY_CLASSES_ROOT\dllfile\shell\Register\command] ...
1
vote
2answers
1k views

Removing linked soft link in Unix

currently i am wanted to clean up my proj area but the problem with rm i am facing is some copy remain in disk with linked i am meaning soft link A linked to B B linked to C C which is on ...
7
votes
1answer
2k views

How to escape the At-sign (@) in Bash

Since Apple made a requirement for certain file names to include an at-sign (@) in my iPhone application project, I can't check in my files using the Subversion commandline. How do is escape the @?
2
votes
2answers
11k views

Using backslash to escape characters in cmd.exe

I see that the caret is the documented escape character. But, I have an example showing that for the double quote character, ^ doesn't work and you have to use \ C:\>runas /user:Administrator ...
4
votes
4answers
2k views

How to automatically launch a shell script when content of a given directory is changed

I'm developing a web project using some libraries that force me to launch a shell command to compile some files everytime i modify them. This task is obviously tiresome and i'm looking to find some ...
1
vote
1answer
456 views

Emacs “shell-command-on-region” does not pass STDIN to command if command line contains meta-characters

I'm running Emacs on Windows-XP SP3 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-07 on SOFT-MJASON When I run a command where the argument contains shell meta-characters, my Emacs region is ...
159
votes
19answers
84k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
4
votes
2answers
1k views

Unable to preserve hard links. Why?

I'm trying to create a Makefile that would automate remastering Knoppix distribution. I'm trying to copy filesystem from the read-only compressed loop device to normal filesystem to be able to modify ...
2
votes
2answers
151 views

are alternate shells for Windows stable?

I looked at alternate shells for WIndows that provide support for virtual desktops. I've found http://www.sharpe-shell.org and http://www.emergedesktop.org/ Are they stable enough to be used in work ...
1
vote
3answers
2k views

Alias to open gVim (Cream version) from Cygwin shell

I'm using the Cream version of gVim, and i'd like to make an alias to open files from a Cygwin shell in Cream. Running the gVim executable from Cygwin gives the following error (in a Windows cmd ...
7
votes
5answers
21k views

How do you get a shell on a Mac?

I have never used a Mac before. I recently went to an Apple store and tried to open a shell to try it out. But, I was not able to open a shell - no shortcut for it, not right-click-menu entry, ...
8
votes
2answers
531 views

Can I keep . and .. out of .* expansion?

I often find it annoying (or worse) when I type command .* in bash and the command applies to the parent directory and current directory. Is there some shell option or other configuration I can ...
1
vote
1answer
444 views

Command not found - let me try again

I encountered some weird bahavior on my linux system. I created some bash script files, and changed their mode to be executable. However, some can be called while others can not. As a work around, I ...
7
votes
1answer
6k views

Awk doesn't work when inside double quotes

This command doesn't work: ssh $HOST "ls -l | awk '{print $1}'"` Above ignores the command awk. I think it might be because of the double quotes? Also, how would I add another set of double ...
1
vote
1answer
763 views

ssh'ing to a host and executing a command not working correctly

I have the following command: ssh $USER@$HOST "ls /ops/pkg/ec/`grep "PKRTS" /ops/pkg/ec | awk '{print $1}'`* > /tmp/tmp_file" What the above SHOULD do..is, ssh to the host then execute the ...
3
votes
2answers
5k views

How can i add “shortcuts” in linux?

How can i add shortcuts like 'rst' for restarting the tomcat in the terminal?
4
votes
1answer
759 views

We have already running windows process. How to determine what parameters it has been ran with?

For example I have a running process seen in windows task manager (.exe). I'd like to see the parameters that's been passed to the process when it was started. I do not start this proces, nor I have ...
1
vote
1answer
4k views

In ps -ef, what information does the fourth column show?

For example, ps -ef Display full information about each of the processes currently running. UID PID PPID C STIME TTY TIME CMD hope 29197 18961 0 Sep27 ? 00:00:06 sshd: hope@pts/87 hope 32097 29197 ...
1
vote
2answers
463 views

reason why the bourne shell command for sourcing a script is

is there a higher reason why the original developers of the bourne shell decided to name the source command .? (afaik the source command is bourne specific, correct me if i'm wrong) note that bash ...
8
votes
2answers
17k views

Bash not loading '.profile' in new session on Linux

I'm setting up a new Linux machine I got from our IT dept, and noticed .profile is not loaded when I start a new terminal session. The current shell is Bash, though I changed it from the default sh it ...
2
votes
4answers
251 views

Is there a tool that beeps and highlights matching lines that are piped through it, while displaying everything

Is there a tool that will let me pipe the output of an executable through it and play a sound or, better yet, highlight the line where a selected phrase occurs? I want to be able to do something like ...
4
votes
2answers
4k views

What's the difference between nohup and “>& nohup.out &”?

nohup renders a process immune to the shell's SIGHUP, but even if I run this from my shell: bash -c 'while true; do sleep 1; date; done' >& nohup.out & then log out and log back in, bash ...
0
votes
2answers
621 views

Unable to install gnome-shell on Ubuntu Maverick 10.10

I run: mojo@mojo:~/Downloads$ sudo apt-get install gnome-shell Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. ...
17
votes
3answers
19k views

How do I fork a process that doesn't die when shell exits?

If I run emacs from the shell: $ emacs foo & and then kill that shell, emacs dies. How can I run a command so that it will not die when the shell dies? I found references to nohup, but that ...
7
votes
2answers
2k views

Smart tab completion (for directories)?

Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo-<TAB> Then it would show me the possible completions along with numbers that I can ...
3
votes
5answers
3k views

Modify the Windows shell menu

I'm sure everyone has been annoyed by a cluttered, slow and ugly shell menu after you install some apps, so I was wondering if there is a way to remove some entries from appearing in the shell menu. ...
1
vote
1answer
2k views

Execute remote shell commands on windows XP embedded

The following situation: We have Windows XP Embedded clients that have all admin shares disabled and only have read-only shares (for security reasons). What we want to do is run remote shell (dos) ...
3
votes
2answers
1k views

Sometimes my .bash_history gets cleared. Why? How can I prevent that?

Here's my shell: $ $SHELL --version | head -1 GNU bash, version 4.1.7(2)-release (i386-apple-darwin10.3.0) Here are my history related settings: export HISTCONTROL=ignoredups:erasedups export ...
2
votes
2answers
149 views

Is this alias any useful?

I am going through and old .cshrc file and it contains the following alias: alias pwd 'echo $cwd' How is that useful? I used to think that this is how pwd might have been implemented. But looks ...
1
vote
2answers
427 views

Why is an internal table of PATH directories maintained?

I was looking for what rehash command does and found this: The rehash command re-computes the internal hash table of the contents of directories listed in the path environmental variable to ...
1
vote
1answer
1k views

Check status of a shell script

I'm running CentOS 5.5 and have created an init script. The start of the script contains: # Source function library. if [ -f /etc/init.d/functions ]; then . /etc/init.d/functions fi The ...
0
votes
3answers
1k views

Shell script to check files and move them to different directory

A client of us, is going to transfer the files to our server. I need to check if the files exist in that inbound directory and if they are , move them to a different directory so I can read them from ...