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
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 ...
3
votes
2answers
9k 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
12k 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$ ...
22
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
674 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
6k 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
22k 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, ...
29
votes
4answers
13k 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
796 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
435 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
1k 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
905 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
322 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
516 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
20k 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
966 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
568 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
6k 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
399 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
308 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 ...
8
votes
3answers
916 views

`which python` points to the python I want, but `python` runs the wrong version

I want to use python24 provided by ports, so I've installed it, and python_select -s shows that the version I want is indeed selected. Running which python gives /opt/local/bin/python, and running ...
15
votes
6answers
20k views

Will rm -rf * remove all files/folders in the current directory?

Will rm -rf * remove all files/folders in the current directory ? I want to make sure the wildcard * won't move up in upper directories and erase all my filesystem. :D I remember doing chmod 777 .* ...
27
votes
5answers
12k views

What is the difference between bash and sh?

I see two types of code being used: #!/usr/bin/sh and: #!/user/bin/bash I searched for this online and opinions vary a lot. The explanations I saw on most websites say that sh is older than ...
2
votes
5answers
12k views

Easy way of daemonizing in CentOS 5.4

I know there is a program called upstart that can make it easy to make small daemons. I can't get this program to configure on CentOS. I get all sort of errors concerning pkg-congfig, libnih, and ...
0
votes
0answers
438 views

user crontabs don't work, only /etc/crontab

Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working ...
2
votes
2answers
1k views

stdout and stderr of script doesn't get redirected when executed by cron

./script &>> log.txt I get a nice logfile, but if I have the same command executed by cron, lets say the crontab looks like this: * * * * * '/home/user/script &>> /home/user/log.txt' ...
5
votes
2answers
7k views

How do you change the default TERM value set at console login (Ubuntu)?

The $TERM shell value in Ubuntu defaults to "xterm" for a console login. How can I change it so it defaults to "xterm-color"? I'm asking because it looks like this is the easiest way to turn-on the ...
2
votes
2answers
1k views

How to Detect that Current (Bash) Shell is a (Vi/Vim) Subshell?

From inside Vi/Vim, I can type: :shell to drop into a shell. Is there any way to detect that I am in a Vi-spawned subshell? The environmental variable SHLVL is 2, but that does not tell me ...
1
vote
2answers
622 views

split command on Ubuntu command-line

I want to split a file into multiple files with at most 25 lines each. I'm using this: split -l 25 /etc/adduser.conf > /home/ubuntu/PL/trab3/rc_ But I do not get the files I expect. How can I ...
1
vote
2answers
423 views

Symlinks are inaccessible by their full path on OS X

I have symlinks pointing to applications placed in /usr/local/bin which is in the path. However, I can't run these applications from other folders. Even more weird, I can't access them by the full ...
2
votes
3answers
6k views

How are Linux environment variables DISPLAY and XAUTHORITY used?

How are these 2 variables used by the X Window system? On my Ubuntu 9.10 host, if I set XAUTHORITY to anything and then try to run a GUI program, I receive a GTK-WARNING ***: cannot open display ...
1
vote
1answer
973 views

Why can't my .cshrc file be sourced automatically?

When I SSH to a certain Linux host, although my default shell is tcsh, the .cshrc file under my home directory is not sourced at all. I can't understand why this happens because from my understanding, ...
6
votes
6answers
2k views

What are the common Control combinations in a terminal setting

I would like to have a good guide to the common Control key combinations in use in bash (and similar) shells and the combinations used by common programs in use in those shells. My particular ...