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

learn more… | top users | synonyms

3
votes
1answer
4k views

How to uninstall zsh

Is there anyway to uninstall zsh? I wasn't able to upgrade it so I want to uninstall it then install it using brew.
0
votes
1answer
67 views

How do I set what should happen in terminal on a certain command?

If I execute cal 2013 in terminal, it echoes the calendar for the year 2013. For the matter of fun, I'd like the terminal to echo This year won't come. How should I do this? I tried adding ...
4
votes
1answer
540 views

Context menu edit - “Create new xxxxx”

I am trying to find a way to create a context menu entry in which I can right-click on an .mp3 and have the option to create a folder based on the name of the file. I.e. Create New Folder "Artist". ...
6
votes
1answer
10k views

Unix : List children processes for a given pid

What I need is, given a process id, list all his children without any clutter (table header, other columns than the pid) What I have is : ps h --ppid $PID Which gives me: 26277 pts/13 S+ ...
3
votes
2answers
7k views

Find out path of program

On Unix I can call certain programs from everywhere, like sort, pwd or my_custom_script.sh. How can I find out, where on the system my_custom_script.sh really resides?
1
vote
2answers
2k views

Bad shell script interpreter? Works sometimes

I have a weird situation where some of my shell scripts that use #!/bin/sh as the shebang sometimes work - other times they yield the following message: bash: ./newshit.sh: /bin/sh^M: bad ...
3
votes
1answer
396 views

Confusion about using fractional +n, -n or n in find options -amin, -atime, -cmin, -ctime

I am not sure if I understood the way find ignores the fractional part when using one of these predicates to find. For e.g. I used $ find . -ctime .2 # files status changed exactly 4.8 hours ago ? $ ...
3
votes
3answers
16k views

How to create a new terminal window from the command line in Red Hat Linux 5.3

I use PuTTY to get to my Red Hat Linux 5.3 workstation from my Windows laptop. Typically, if I want a new terminal on my Windows 7 workstation from another terminal or mc, I have to type start ...
1
vote
2answers
2k views

Generating a timestamp to usec accuracy in shell (Busybox)

I want to generate a textual timestamp in the unix shell with microsecond accuracy, without using the %N date option (I am using busybox, a smaller unix toolset that does not have this option), to ...
0
votes
1answer
147 views

Change order of folders in the windows shell

In the shell of Windows 7, can I change the order of the folders displayed on some hierachy level? E.g., in Documents, I might have folders a, b, c, d, e and want to have the order a, c, e, b, d.
12
votes
3answers
10k views

Bash shell: list all files of type .png or .PNG?

In a bash script, how can I say 'for all files of type .png or .PNG'? I'm trying : for i in (`ls *.PNG` && `ls *.png`) but getting a syntax error.
6
votes
1answer
2k views

Is the invisible text bug in bash a bug or a feature?

On every single linux distribution I have used the last 10 years there has been the following inconvenience: You run a program in the terminal using bash. After the program is stopped or interrupted, ...
2
votes
1answer
64 views

How to change terminal to include <time of day> and <pwd>

How can i make my shell prompt read: <pwd>$ <time of day>
8
votes
1answer
3k views

versions of netcat

I've tried the two main versions of netcat : GNU and BSD. (mine is BSD Version). On GNU version, the command $ nc -l -p 12345 works fine but with BSD, option -l (listen) can't be used in conjonction ...
7
votes
4answers
12k views

Linux: neither chsh nor ypchsh is working, can I change my shell?

I'm an old-school Unix guy, so my Linux skills are probably slightly out-dated. But this seems like it should be simple enough. On a Red Hat Linux system where I do not have root (it is administered ...
0
votes
3answers
118 views

What happens if I set my shell to be an invalid program and restart?

If I change my shell to be something like /bin/abc, where abc is something random (or may not even exist), what happens when I login (assume that I have added it to /etc/shells, so chsh won't whine.)? ...
6
votes
1answer
2k views

#!/usr/bin/env Interpreter Arguments — portable scripts with arguments for the interpreter

Because interpreters such as zsh, bash, python, perl may be located in different places on the filesystem, scripts often have a shebang that uses env for portability, e.g. #!/usr/bin/env zsh. ...
0
votes
4answers
1k views

Remove files that don't end on “.py” using rm [duplicate]

Possible Duplicate: Remove all files but one with rm This is a very simple question and i dont know whether a solution exists or not. I have some files in a directory, assume i have .py ...
4
votes
3answers
1k views

Why is reading a FILE faster than reading a VARIABLE?

I don't understand the results of a simple performance test I ran using two basic scripts (running on a high end server): perfVar.zsh : #!/bin/zsh -f MYVAR=`cat $1` for i in {1..10} do echo ...
6
votes
2answers
9k views

How do I clear all environment variables from a Windows shell session?

If I start a new Windows shell session and type: env I see lots of environment variables set. I want to debug the running of a command line program by removing all environment variables from the ...
12
votes
11answers
20k views

Is there any replacement for putty [closed]

Is there any nice looking terminal with more features and sexy looks than putty? I find it very boring.
2
votes
3answers
94 views

Which versions/configurations of Microsoft Windows include the “where” command?

This question came up in the context of answering a programming question on Stack Overflow. where is a handy command to locate a file on the path, roughly equivalent to the Unix which. My Microsoft ...
9
votes
6answers
8k views

Clear stdin before reading

I have the following bash script: # do some time consuming task here read -p "Give me some input: " input Now as you might have guessed, if a user presses some random keys during the "time ...
0
votes
2answers
579 views

linux(ubuntu) shell window width

anyone knows how to change the default width for shell window in Linux(Ubuntu), so that I don't have to re-size it every time I open it up? Thanks
0
votes
1answer
914 views

Iptables prerouting and IP forwarding

I have a linux machine used as gateway for a Win XP machine. Both are in Virtual machine for testing purpose. Now I want to trick the Win XP user (me) with the forwarding of an IP address: I want to ...
0
votes
1answer
1k views

supply password in crosh (chrome os shell) ssh?

I have a CR-48 and I'm attempting to connect to SSHdroid. I understand the standard command for connecting to SSH is ssh root 192.168.2.bla but how do you supply a password along with that command ...
3
votes
1answer
545 views

Custom syntax highlighting in Bash shell (using keywords)

I know it's possible to change the $ user@hostname colors, but is it possible to color different things? Could I make all numbers/integers a certain color. Or set certain keywords to be bold?
2
votes
1answer
100 views

Linux Rights issue

Firstly, I am running all of these commands through www-data user..which is apache2 user... Using php, and exec function to run these commands... I create the directory mkdir -p testing Now lets ...
1
vote
1answer
1k views

csh cd alias: how to eliminate error when no parameter is supplied

I am familiar with bash, but my works require csh. in my .cshrc, I created this alias: alias cd 'cd \!:1; ls -l' It works very well except for one case: when I cd without any parameter: cd In ...
1
vote
2answers
794 views

shell script post commit hook that just does date > /tmp/post-commit.log nothing is written to log file

I installed svn server with apache 2 on ubuntu 10 i have created a post-commit.sh with a single 2 lines of code repository/hooks/post-commit.sh: #!/bin/sh date > /tmp/post-commit.log nothing ...
2
votes
2answers
2k views

Extract a zip file to your own directory

Im trying to extract the contents of a zip file but I want to extract it to my own directory. I'v tried -d from unzip but that just puts the contents of the zip into that directory. But I want to ...
2
votes
3answers
2k views

How do I su to user login shell directly

I do the following many times a day I login to a server via ssh as user1, I then do su - to become root, then I do su --login user2 to become user2 Is there a way to tell su to go to user2 ...
104
votes
8answers
61k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
0
votes
1answer
2k views

How to copy files and directories while retaining file permissions in UNIX

How can I copy files and directories from one user to another user on a unix system so that the file permissions don't change? The recipient is not the owner, but I have root permissions. Thanks.
1
vote
1answer
385 views

Which linux environment varaiable gives the path to the users desktop?

It turns out that different languages can have a path to the desktop folder. ~/Desktop is ~/Työpöytä in Finnish What way via the shell can I get access to the translated folder?
2
votes
3answers
5k views

Ubuntu 10.10 'Command not found' for python script

I have a python script 'monty.py' with #!/usr/bin/env python in the first line. When I run monty.py in the terminal, I get monty.py: command not found I am in the correct directory, and I also ...
7
votes
3answers
15k views

Is it possible to use putty as the UI for the Windows shell?

PuTTY is much better than cmd.exe. Can I use PuTTY to execute Windows commands?
1
vote
3answers
518 views

Single quotes and variables inside a bourne shell

I have this command that I'm trying to execute in the bourne shell for Solaris 9. find ${DATADIR} -name "check_*" -type f -exec sh -c '$0 | ${PARSEDATA}' {} \; >> ${TMP_1} My problem is, the ...
4
votes
3answers
7k views

What is the default terminal (shell) for Xubuntu?

What is the default terminal (shell) for Xubuntu? Does Xubuntu use the same shell as Ubuntu?
3
votes
3answers
1k views

Which shell to use to modify/replace Windows Explorer (don’t want fancy desktop but better browsing of folders/files… similar to Classic Shell)

I do know about the existence of alternative shells such as SharpE, Emerge Desktop, Ashton Shell, BB4Win, etc... I've looked into a few of those popular/famous ones, but they all seem to be very ...
2
votes
2answers
772 views

how to know if a directory is referenced by a symlink

Is there a command that I could execute to find out if a directory is referenced by a symlink somewhere on the machine. ie: pwd => /home/user/source/ vdir lrwxrwxrwx 1 user group 24 ...
0
votes
2answers
453 views

Copying without overwriting an entire directory structure in Windows

I need to copy only new files from the source directory structure to the target directory structure. I found that xcopy supports the /y switch to always overwrite and /-y to prompt. Is there a switch ...
0
votes
1answer
316 views

how to use md5sum on certain files

Imagine I have a filelist like this: file1.php file2.php login1.php login2.php logout1.php logout2.php And I want to do an md5sum on files called login* <- something like that. I need to count ...
2
votes
2answers
1k views

list files in specific directories older than 1 day or 24 hours

I am trying to write a simple back up script in python where I try to list the files that are 24 hours old in specific directories that I would choose. I read the manual of find and used find . ...
5
votes
6answers
25k views

Accidentally deleted the Downloads folder, a windows “Special Folder”, how to restore?

I deleted the Downloads folder in my Windows 7 home directory (which I had moved and renamed to incoming) I was able to restore the folder from a backup, this restores the contents as well as ...
7
votes
3answers
26k views

Disable color in shell/terminal

I want to disable all color in my shell. Not ls, not nano, not vi, nothing. What's the best way to achieve this?
0
votes
1answer
600 views

Backup files to Windows share from Mac 10.3.9 schell script throws permission denied errors

So I have this script I'm working on to try and copy a couple files to a windows server as a backup. It appears as though I am able to mount the share well enough, however I seem to be unable to copy ...
1
vote
4answers
16k views

Search with “grep” for folder names

When using grep you can search for a specific regex, but only inside of a file. Is there any way, I can search for a folder name?
1
vote
2answers
1k views

How do I automate a set of VIM commands that I use all the time?

I'm running some text files written in Markdown through Pandoc to get html, but it renders the tags strangely with weird line breaks and white space in tags, so I've been running a few sed commands in ...
1
vote
1answer
68 views

Developer oriented Windows command shell with bookmarks?

I'm looking for a command shell in Windows 7 ala Powershell that allows me to have bookmarks and such, so I can start a shell in a specific directory, remember command history, have completion for ...