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

learn more… | top users | synonyms

2
votes
3answers
4k views

Linux Ubuntu 12.04 high Load without high cpu/ram usage. Which tools and techniques to diagnose/solve this?

I'm having a huge load after install Linux Ubuntu 12.04 My machine now is a Intel G620/4G RAM/ 1T HD, before it was a Amd X2 5000/4G RAM/250G HD Now uptime in idle mode: 12:45:03 up 3 days, ...
4
votes
2answers
1k views

Does the Linux 'nice' command work on any shell script?

Does nice work on any shell script, or does it work on basic Linux commands only? For example, if I have a custom shell script that contains a sort function, and I call nice myscript.sh would ...
0
votes
1answer
295 views

Cygwin shell is overriding my Windows shell

I'm not sure what I did, but I've somehow got Cygwin installed in such a way that even when I try to run an ordinary windows shell, Cygwin is interfering. I have batch scripts that I want to run in ...
1
vote
1answer
638 views

Unix tool to output first n characters in an UTF-8 encoded file

I want to print the first 1000 characters in an UTF-8 encoded file. I know that the head tool can print the first n bytes of a file, but it may cut a character in the middle so that I get garbled ...
2
votes
3answers
572 views

How do I create a soft link to all executables in a different directory?

I am trying to create soft links to mingw's binaries in cygwin. So far I have: find /cygdrive/c/MinGW/bin/ -name "*.exe" -exec ln -s {} basename {} \; but I get: ln: target ...
8
votes
3answers
955 views

How can I keep the color when I run the external command inside vim?

For example, for the command ls --color displays colorful results when being executed in the shell. However, when I call :!ls --color inside vim, all color information is gone. What should I do to ...
2
votes
1answer
151 views

What's the owner of the file in OSX for a program, or how to get it?

I'm using Mac OS X 10.7. Today I created a new user account, and moved everything under my own user account to my new one, and did a command: sudo chown -R [new_user_name] /Applications sudo chown -R ...
-5
votes
1answer
154 views

is Windows Vista x64 Ultimate secure with replaced shell explorer.exe? [closed]

I've replaced explorer.exe as the default shell with steam.exe using a program called instant sheller. I don't want to run the stock firewall, and want to invoke the firewall and antivirus from the ...
3
votes
1answer
692 views

How can I run an AppleScript or shell command on Mac OS X at screen unlock?

Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.
12
votes
1answer
2k views

chain Fish commands via `&&` or `||`

In Bash/ZSH and other shells, I am used to using && and ||. Is there any equivalent in Fish?
1
vote
2answers
389 views

run any shell script from Fish and import all exported env variables?

Is it possible somehow to import all environment variables which are exported by a subprocess started by Fish? E.g. from my Fish session, I start bash ~/.profile, which exports some variables and I ...
6
votes
2answers
2k views

re-use '~/.profile` for Fish?

(I'm talking about the shell Fish, esp. Fish's Fish.) For Bash/ZSH, I had ~/.profile with some exports, aliases and other stuff. I don't want to have a separate config for environment variables for ...
0
votes
1answer
84 views

Bash Profile Coloring

I would like to make a few changes to my bash profile. Changes I would like include: Coloring Files: I would like files with the execute permission bit set to be colored green. I would like to ...
2
votes
2answers
876 views

Shell Script, iterating over a folder

I have very basic shell scripting knowledge. I have photos under original folder on many different folder like this folder + folder1 + original + folder2 + original + folder3 + ...
2
votes
2answers
267 views

Working shell command doesn't alias

I can run, svn status |grep -v .jasper$ |cut -d ' ' -f8 |sed '/.*\..*/!d' |xargs ls -altr --color=auto just fine. But when I go to add this as an alias (alias svtr="...") I get an error saying... ...
3
votes
2answers
290 views

Making aptitude work properly through a proxy invoked with sudo

I use Debian 6. I'm sitting behind a proxy, so I configured Debian to use that proxy. Browsing and any HTTP and FTP activity through GUI works OK. I wanted to update my package repository so I typed ...
3
votes
2answers
198 views

deleting /bin entries in linux

I have installed CentOS. I want to remove bzip2, so I enter this command in the shell: yum remove bzip2 bzip2-libs Then nearly 500 packages were removed and I can't enter any command. For example: ...
0
votes
1answer
163 views

zsh : How to list directory content with tab?

I just switched from BASH to ZSH and thing are pretty good, but: when I start typing cd /usr/share/s and hit TAB, this is what I get: $ cd /usr/share/sane/ sane/ skype/ ...
0
votes
1answer
35 views

Creating a link to name changing directory

I have an Ubuntu 12.04 installed using wubi + Win7. I'm trying to create a link to "my documents" directory which located in my C drive: C:\Users\Myuser\My Documents\ Since the Ubuntu is installed ...
1
vote
2answers
1k views

How to check what slows down my terminal startup?

Is there a way to check what slows down my terminal startup? I'm using zsh with ohmyzsh on iTerm2. It takes about 10 second to open a new window :( This is my zshrc file: export ...
0
votes
1answer
414 views

unable to edit file /proc/self/make-it-fail

I am editing file /proc/self/make-it-fail from root user. This file is having write permission but update not possible, showing "E667: Fsync failed" error.
3
votes
2answers
7k views

How to print new line character with echo?

I dump a string with hexdump like this 2031 3334 2e30 0a32 2032 3331 302e 000a. It is clear that 0x0a is new line character, however, when I try to echo this string out, I always got 1 430.2 2 13.0 -- ...
0
votes
0answers
177 views

Nano (pico) editor window resize

I am still not sure what I have done but I was testing some button combinations when I was in nano editor and all of a sudden the contents of the window started not to adjust themselves when I resized ...
-1
votes
3answers
601 views

Limiting files with wget

I'm trying to download mailing list archives such as http://cryolist.org/archives/ In particular, I have a page and would like to download every file linked from that page which ends with ".txt.gz". ...
0
votes
2answers
379 views

Linux WGET -O command for non existing folders?

I can't wget while there is no path already to save. I mean, wget doens't work for the non-existing paths. For e.g: wget -O /path/to/image/new_image.jpg http://www.example.com/old_image.jpg If ...
1
vote
1answer
84 views

Windows shell damaged? Basic tabs and buttons layout with Aero enabled

I would need little help from you. This is first time I see something like this happen to shell in Windows 7, as you can see, tabs and buttons in some programs, or control panel (see screenshot) are ...
0
votes
2answers
63 views

how do you alias a program whose name conflicts with a built-in while retaining the built-in under a different name?

In zsh 'kill' is a built-in. I would like to alias killall to kill, as I use 'killall' more often and aliasing it kill would be more convenient. i would like to retain the ability to use kill, ...
1
vote
2answers
770 views

What is the unit of size in df -k command output in linux box

what is the size unit for used, Available and what does 1K-blocks mean here does it say that size is always in kB? command: df -k | head -2 output: Filesystem 1K-blocks Used ...
3
votes
3answers
925 views

How to check if zip file is empty in bash

How can I verify if the zip file is empty or not ? I cannot use if -s in bash as the zip file is not always zero in size. if the zip file has empty directories in it, I want to delete the file else ...
0
votes
2answers
251 views

vim: Change colorscheme for internal shell

I'm using the solarized colorscheme for gvim. I'm using 'light' for normal editing. I want to switch to 'dark' when I invoke vim's internal shell (:sh). Is there a way to do this?
0
votes
1answer
951 views

Set vim's internal shell path

I'm trying to configure the $PATH env variable of vim's internal shell. I have commands that update the $PATH several times during a session. I see that vim inherits my shell's first $PATH - but not ...
1
vote
1answer
63 views

VIM in shell triggers d key but GVIM work ok

I have strange problem with my vim. In shell when I edit file my VIM triggers (probably) d key (running vim test.txt). When I press j he deletes first 2 lines. Everything works ok when i run without ...
0
votes
1answer
766 views

VIM zsh, bash and colors in command line on Ubuntu

I have problem with VIM command line when calling system commands. e.g. !ls, all command output colors aren't parsed by VIM. My system is Ubuntu 12.04 LTS with VIM 7.3.429 from Ubuntu repositories. ...
-1
votes
2answers
748 views

How to “cd” into system files

I have files saved under Macintosh HD/Library/... that I need to manipulate using bash. How can I access those files in the shell?
1
vote
2answers
2k views

script calling script as other user

Using CentOs, I want to run a script as user 'training' as a system service. I use daemontools to monitor the process, which needs a launcher script that is run as root: : #!/bin/bash exec >> ...
0
votes
2answers
628 views

Opening new terminal window does not pick up .cshrc

I am using KDE and Konsole. When I open a new tab, it does not pick up my .cshrc in my home directory. I am using tcsh. How I do I force re-loading of the .cshrc in my home directory without having to ...
0
votes
0answers
581 views

Shell script to copy a text file from windows machine to linux based device

A linux based navigation device is connected with my windows machine. I want to copy a text file to root of device using shell script from windows machine(through cygwin or putty). please help. ...
0
votes
3answers
537 views

detect content from zip file without uncompress it

I'm trying to check a lot of zip files to make sure it contains the right directories. what I've done is looping all the zip files then use unzip to uncompress and check it one by one.But the CPU and ...
0
votes
1answer
351 views

Check how many packets are being received by each interface/computer on the network

Is there a way I can check via terminal or command line how many packets are being received by each interface/computer on the network? I want to check which PC is downloading a large amount of data. ...
1
vote
0answers
29 views

Looking for Primos “name generation” code

Does anyone remember Primos? It had a shell-level thing called name generation which was very useful. For example, to rename a bunch of files from part1.suffix to part1.new.suffix2 you could say: ...
0
votes
2answers
458 views

how to get bash prompt on login

When I connect to a remote machine using SSH, by default it is not on the bash prompt. To get the bash prompt by default on login I did as below by creating a .cshrc file in my home directory: if ...
1
vote
1answer
3k views

How to zip multiple files into separate archives?

I admit this question was asked here before: Like Zip into separate files where the person who asked didn't specify the OS he used and received no answers. I need to separate a huge directory ...
2
votes
1answer
214 views

Can tar be forced to exit on the first error?

By default, for many kinds of errors tar prints a message to stderr and then continues on its way -- the errors it calls "recoverable" errors, typically errors that relate to a single file or archive ...
3
votes
1answer
65 views

Per directory shell customisation

Is it possible to source a shell file when entering a directory, and unsource it when I leave? I.e. certain project directories would be really useful to autoload some command aliases, but only in ...
0
votes
2answers
309 views

Search for exe file within a condition

I want to search for all .exe files greater than 200 kB or smaller than 120 kB in the current folder and its subfolders. Then I want to move them to another folder called "folder" and execute in this ...
4
votes
1answer
456 views

bash completion does not work for newly added user

I added a new user in my ubuntu system with sudo useradd -d /home/peeyush -m peeyush sudo passwd peeyush The above list of commands created a new user successfuly but the new user is unable to use ...
0
votes
1answer
2k views

UTF-16 file output in cmd.exe

chcp 10000 echo hell☺ w☻rld♥! >> "UTF-16 file☺☻♥♦♣♠" OK, it creates correct file, but in the content there are question marks instead of unicode characters. How to fix it?
3
votes
1answer
3k views

Send all error messages to a text file?

I'm trying to run the following command: $ psql -d template_postgis -f /usr/local/pgsql-9.1/share/contrib/postgis-2.0/postgis.sql It produces a vast amount of error output, of which I can only ...
1
vote
1answer
514 views

tail -f updates slowly

I'm not sure why, but on my Macbook Pro running lion I get slow updates when I issue "tail -f" on a log file that is being written to. I used to use this command all the time at my last company but ...
19
votes
5answers
21k views

How can I do a recursive find and replace from the command line?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its ...