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
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
588 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
917 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
548 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 ...
2
votes
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
808 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 ...
3
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 ...
108
votes
8answers
66k 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 sessions?...
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
395 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
6k 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
8k 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
818 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 2011-04-...
0
votes
2answers
462 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 . -...
6
votes
6answers
26k 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 Desktop....
8
votes
3answers
27k 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
605 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
17k 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 ...
1
vote
3answers
845 views

Easiest way to automatically copy files between computers

I am trying to write a script which will essentially copy and file in a certain folder to a folder on another computer. My first thought was SCP, but I don't know if I can automate SCP by adding a ...
2
votes
1answer
337 views

Help converting a .bat to a .sh

I need a little help converting a short script from .bat to .sh :convertfile @IF %1 == "" GOTO end imf_copy -p %1 "%~d1%~p1%~n1.map" @SHIFT @GOTO convertfile :end @ECHO. @ECHO Done! @pause imf_copy ...
14
votes
9answers
11k views

How do I copy file named starting with a dot?

I am trying to copy all files under directory A to directory B. All files under directory A are starting with dot, for example: A/.a A/.b A/.c which I found if I use: cp A/* B, always get error: ...
5
votes
2answers
4k views

How do I start cygwin with a specific command?

I want to start Cygwin and it should instantly connect to some server: $ ssh user@1.1.1.1 for example, how I can achieve this?
0
votes
2answers
359 views

Shell: Trim whitespace in the beginning of files

I have 20k files in here, and at least 1000 of them having white space in the beginning. How can I remove whitespace with sed for example? The problem is, that it may apear some duplicated file ...
0
votes
2answers
1k views

Best terminal for macos [duplicate]

Possible Duplicates: What's your favorite app alternative for Mac OS X's Terminal.app? Alternative terminal emulators for OS X Are there any alternatives for Terminal.app. Maby with ...
7
votes
3answers
2k views

PDF reader for the CLI

I'm looking for a PDF reader that I can use over SSH in a terminal, and have it running in screen. Does such a thing exist? Ideally I'd like at least a less-esque pager but with some PDF formatting, ...
1
vote
1answer
34 views

Can I tell less to read in a whole stream?

Related to this question: How can I get file information in 'less' like with 'man'? Is there a way to ask less to suck in a whole stream to EOF (or at least to some size limit) so ...
4
votes
1answer
1k views

Can't see some programs from Console2 or Powershell

I use Console2 to run various shells (git bash, powershell, cmd). However, there are some programs that aren't accessible when I run Console2 or Powershell that are accessible from a plain cmd prompt....
2
votes
1answer
327 views

wipe disk with dd

I know we can wipe a hard disk using random data or zeros, but is it possible to wipe using a fixed string ? e.g. is this correct? dd if="string" of=/my/harddisk ... Also, does the options below ...
0
votes
2answers
185 views

why php doesn't get updated to the latest version on my server?

here's phpinfo() of my server: http://www.rimmer.sk/phpinfo.php when I login to the server as root and do sudo apt-get update and then sudo apt-get upgrade, let it run completely, all finishes OK. ...
4
votes
1answer
550 views

Zsh shift selection

How to use shift to select part of the commandline (like in many text editors) ?
6
votes
5answers
10k views

Bash color shell on Mac?

How can you make a bash shell list executable files in a different color than non-executable files? I've tried editing ~/.bashrc to contain the following line (it's otherwise empty): LS_OPTIONS='--...
4
votes
2answers
2k views

Load website and fill form from the command line

Using the Linux command line (Bash shell) I like to load a specific website in my browser (normally Firefox, but other one would be ok as well as long it runs under Linux) and fill a pre-defined form ...
29
votes
9answers
5k views

Any shortcut for “cd ..”?

Is there any shortcut for cd ..?
6
votes
2answers
2k views

How can I get emacs under windows to autocomplete paths in shell buffers using “\” instead of “/”?

I'm using emacs to work on linux, windows, osx and everything is fine except one annoying problem with shell buffers under windows. Autocompleting filenames would work great (better than standard ...
2
votes
4answers
200 views

Retrieving a specific value from “df -h” using shell

When I use df -h, I get the following output: Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 59G 2.2G 54G 4% / /...
32
votes
4answers
50k views

How to cd to a directory that contains a space in its name?

I have a directory called "Reader 0.5" in my Desktop on Mac Os X. When to access the directory in terminal, I am using below code: cd /Users/niho/Desktop/Reader 0.5 but it throws: No such file or ...
11
votes
4answers
21k views

echo newline character not working in bash

I have bash script which has lots of echo statements and also I aliased echo to echo -e both in .bash_profile and .bashrc, so that new lines are printed properly for a statement like echo 'Hello\...
2
votes
3answers
2k views

Is there a way to insert a timestamp in a file in Ubuntu?

I often find myself needing to type out a timestamp into a text file. Is there a way to quickly insert the current timestamp into a file in Ubuntu?