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
1answer
12 views

Where does device mode and state output come from, and how do I disable it?

Whenever I change my wlan broadcasting details with hostapd I get some output like this: [ 6706.929857 ] device wlan0 entered promiscuous mode [ 6707.986991 ] br0: port 2(wlan0) entered forwarding ...
1
vote
1answer
12 views

Search for files created at specific time in folder OS X

I have a folder with 2000+ image files in it from a time lapse camera. I want to find/select all the images that were taken at the time 10:00 and 15:00. The find function has a "date created" but I ...
35
votes
3answers
24k views

How to change the Login Shell on Mac OS X from bash to zsh?

I'm trying to change the Login Shell of Mac OS X from bash to zsh. I see it is possible in Mac OS X Leopard, but for OS X Lion I can't find a way. I really hope it is possible to change the Login ...
2
votes
2answers
127 views

How to check if a file exists after a specific interval of time

I want to check if a directory contains a file (for example sample.txt). If it doesn't contain that file in 5 hrs then I would need to perform some action. How can I do this in a script? I tried ...
4
votes
3answers
4k views

How append a string at the end of all lines?

I'm trying to add a string at the end of all lines in a text file, but I have a mistake somewhere. Example: I've this in a text file: begin--fr.a2dfp.net begin--m.fr.a2dfp.net begin--mfr.a2dfp.net ...
1
vote
2answers
21 views

How to set a time length of ssh and redirect the error message

I have a hostlist and there are several hosts. I want to use ssh to connect to them. I want to see whether the host is available or not by the time length of ssh takes. If it take long than 5s (which ...
0
votes
0answers
19 views

Android ADB Shell sendevent Not Working

I want to simulate pressing the power button on a rooted Samsung Galaxy Tab 2 GT-P5100 running Android 4.0.4 using the ADB shell. To do this I changed the relevant permissions using: adb shell su ...
1
vote
0answers
12 views

How does OS X's Terminal pass the new tab's dir to login or bash?

In OS X, you can add a shell to /etc/shells and set it as a user's default shell, such that when they open the terminal they are presented with that shell. In addition, When you have the option to ...
0
votes
0answers
88 views

How to make an application accessible for ISPConfig's shell user?

We are using ISPConfig to manage our VPS. We have created a domain with a shell user assigned to that domain. There is an application installed on the VPS that is called Drush (shell application for ...
0
votes
2answers
28 views

Unix/linux shell scripting floating point division

I have to divide two floating point values and store it in variable. My code below v_missedvol=4003.03 v_allvolume=3003.03 v_vol_temp= $(echo "$v_missedvol / $v_allvolume" | bc -l ) the result ...
7
votes
8answers
678 views

Remove linux file named with set of shell responsive characters

I've created a file named \;:$"\' to test a software of mine. I ended up with an error, because I cannot delete the file property. I'm trying to find a precise character combination to remove it via ...
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
1
vote
1answer
20 views

What triggers notifications of the form “Bell in session Shell” in KDE?

I'm running KDE on Debian Testing. From time to time, programs running in a terminal (Konsole) trigger system notifications of the form "Bell in session Shell". What triggers these notifications? ...
14
votes
4answers
30k views

How can I use a bash like shell on windows

I use Linux and a Mac. I'll be teaching some command line stuff soon. What can I install on Windows to give me a terminal window most similar to a basic mac/linux bash shell. Would like to be able to ...
1
vote
2answers
69 views

Edit xml file using shell script / command

I need to do this using unix script or command There is a xml file in /home/user/app/xmlfiles like <book> <fiction type='a'> <author type=''></author> ...
1
vote
2answers
38 views

Is there a folder-specific .bashrc or .bash_profile?

Is it possible to have a bash script (like a .bashrc or .bash_profile, basically) that is executed only upon cd’ing into a specific folder?
0
votes
0answers
15 views

Git Bash on Windows 8 open to specific directory except when using Git Bash Here context menu

When I right click and choose Git Bash here it works as expected and the shell launches in the correct window. When clicking just the icon, despite changing the Start In settings, the directory is ...
0
votes
1answer
12 views

What is CMPRS in this top command output?

Processes: 264 total, 2 running, 9 stuck, 253 sleeping, 1229 threads 2015/04/13 17:17:48 Load Avg: 1.00, 1.22, 1.24 CPU usage: 6.36% user, 21.81% sys, 71.81% idle SharedLibs: 14M resident, 16M data, ...
1
vote
1answer
15 views

Make shell script rerun command on certain user input

I'm writing a shell script that randomizes my hostname but prints the random hostname and prompts me if I want to use this hostname for example NEXTHOST=$(sed `perl -e "print int rand(99999)"`"q;d" ...
3
votes
2answers
1k views

How to justify and center text in bash?

Newbie here. I'm looking for bash script to center and justify text. My script only works with one line of text. How would you improve it? #!/bin/bash COLS=$(tput cols) while true; do clear ...
0
votes
1answer
53 views

Looping through files and collecting data

Ok, I have a problem that I think you guys can help with. I have 24 folders. Labeled Angle1, Angle2, ... , Angle24 Each folder has a file name output.txt In each file named output.txt, I want to ...
4
votes
5answers
12k views

How do you run Vim in Windows?

I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried ...
2
votes
3answers
63 views

Can I change my PATH dynamically based on my cwd?

I would like to change my $PATH environment variable dependent on my current working directory. Say I'm in /foo/bar/baz and I have the directories /foo/node_modules/.bin and ...
2
votes
3answers
41 views

How can I find what a Windows PC thinks its name is, given its IP?

How can I find out what a remote Windows PC thinks its host name is, given its IP? From Windows cmd.exe or a Linux shell. I'm not interested what a DNS server thinks the host name is for an IP, just ...
0
votes
1answer
20 views

Controlling tty / terminal output from other session / shell

We are told that a tty can control at most one session and furthermore that ttys can be controlled not to allow background process groups within its controlled session to write or read from it, the ...
0
votes
1answer
35 views

How to clear screen on Python 3.4.2 shell?

I am trying to clear the screen on python 3.4.2 shell, I used clear screen, clear(), cls, clrscr etc. But no one is working, Please let me know the command to clear the screen.
532
votes
7answers
350k views
1
vote
1answer
539 views

BitLocker missing in Windows 8.1 Pro

This is a TPM-free laptop dual booting to Windows 8.1 Pro and Windows 7 Pro. BitLocker was turned on in Windows 8 Pro (before upgrading to 8.1) via group policy. Everything was fine initially, but ...
0
votes
1answer
24 views

How to show path in shell, but only a fixed number from pwd?

Basically, I want to display something like: me@host.serv.com:../projects/1234/source$ cd cpp me@host.serv.com:../1234/source/cpp$ instead of: ...
1
vote
1answer
213 views

Automaticly run xinit from rc.local as different user

I'm working on some tuning of my raspberry pi b+. So I decided that midori should start automaticly after autologin. With startx it works without problems, but X is still to ressource hungry. So I'll ...
143
votes
18answers
73k 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 ...
14
votes
3answers
15k views

Mac OSX: conventional places where binary files should live

I'm only vaguely familiar with Unix and the filesystem convention for Macs, so sorry if this is a dumb/easy question. I've downloaded an application that is a command-line application, and want to ...
1
vote
4answers
1k views

How to columnize text with tabs (in vim or on the shell)

I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes. When I do this, it helps if the text is aligned properly into columns. For example (assuming 4-space ...
1
vote
2answers
3k views

Mac Terminal showing bash instead of my username

This makes it hard to know what directory I am in. I installed a version of python for school and now it says -bash-3.2$ instead of MyMacbook: ~$. I'm sure this is really simple, but I know nothing ...
2
votes
1answer
110 views

Command Not Found When Executed via PHP shell_exec()

I want to execute following command on my Ubuntu server using php: android create project --target 8 --name $fname --path ./$fname --activity MainActivity --package $fpack 2>&1 The above ...
1
vote
2answers
246 views

How to start a job in the stopped state?

In bash, how can I initiate a job in a stopped state, as if I started it normally and then immediately pressed Ctrl-Z? Or as if I had sent SIGSTOP to the process immediately, but without giving the ...
0
votes
1answer
20 views

When in ~ directory, why doesn't ls show /usr/ directory?

I can cd /usr/, but why doesn't ls -a or ls -d or ls -d */ show me that the usr directory is there? I have already seen this question, but ls -d */ yields ls: cannot access */: No such file or ...
1
vote
1answer
27 views

Hiding internal work outputs by shell script

I make a shell script that can update a tools. I want that when i run the root@host:# sh script.sh then the output will be Its installing Its done But now my script look like root@host:# sh ...
0
votes
0answers
10 views

Find history event by prefix with a hyphen

I often have to use commands that have a hyphen in their names and differ only in the part following the hyphen. I am used to using bang-history expansion, but there is a problem with how zsh handles ...
3
votes
3answers
119 views

Prevent fork bomb when using interactive commands (like script) in .bashrc

I've often wanted to log the output of Terminal. So I tried to set script to run at startup; in my .bashrc file I put: script ~/Logs/$(date "+%Y-%m-%d.%H-%M-%S") Because the commands in my .bashrc ...
0
votes
2answers
43 views

chown -R root:root .* in /root performs chown on /

When running the command in the title from /root it somehow jumps up to / and changes ownership for ALLfiles, i only noticed because error messages for /proc popped up. Maybe i'm getting old but ...
14
votes
6answers
13k views

Stop Windows 7 Explorer from automatically expanding folders

Windows 7 Explorer can be opened in any folder from the command line. But, it automatically expands (on the left nav panel) the Favorites, Desktop, and [Username] folders. This makes it hard to see ...
14
votes
3answers
5k views

How can I do Ctrl-Z and bg in one keypress to make process continue in background?

I follow this pattern of suspending the task and then letting it to continue too often with the Ctrl-Z bg sequence. I was wondering is there any way to compress that to single keypress? My shell is ...
33
votes
7answers
91k views

looping through `ls` results in bash shell script

Does any one have a template shell script for doing something with ls for a list of directory names and looping through each one and doing something? I'm planning to do ls -1d */ to get the list of ...
2
votes
1answer
25 views

Navigate to the biggest directory in a directory in windows cmd

I am inside a directory which contains two directories - "games" and "music" and I want to descend into either "games" or "music" depending on which one has a bigger size.
1
vote
3answers
2k views

On Unix, open xls file, and read the content, only the data

Does any one know how to open xls file in shell on UNIX? whether is there any tools to convert XLS to CSV?
4
votes
2answers
2k views

How to launch the Windows Explorer shell after starting with a different one?

The following is a hack, but for what I need it for its fine. I created a C# program that shows some EULA text and has an Agree and Disagree button. I set the ...
1
vote
1answer
17 views

Custom Windows shell hosted on the network

We have a custom kiosk-style executable that we are using as a shell on Windows 8.1 machines. We'd like to host it on the network so that it's easy to update as desired. The problem we have is that ...
4
votes
2answers
4k views

How to add commands of windows to local shell of XShell 4

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: ...
0
votes
0answers
22 views

How to pass the command to the other server using ssh

#!/bin/bash ENV=stg NODE=node4 KEYFILE=************ USERNAME=ubuntu PORT=22 HOST=********** CASSANDRA_HOME=/ebs/var/lib/cassandra KEYSPACE=*** TABLE1=RegisterUser TABLE2=EmailSyncMetadata ...