The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

9
votes
3answers
1k views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
1
vote
1answer
260 views

fg a bg process because you forgot to redirect output to /dev/null

I did Ctrl+Z bg with the intention of disowning next, but I forgot to redirect, now I cant get to my terminal because the scrolling of the output (tarballed a huge directory with verbose set). How do ...
2
votes
1answer
1k views

How do I decrypt a message using openssl's CLI?

I have a message, I know the password and the cipher that was used to encrypt it, but I can't figure out how to ask openssl to decrypt it. I see the cipher in the output from the ciphers command, and ...
2
votes
1answer
110 views

Why when I enter the command “hostname” it returns something other than my computers name?

I am using a macBook Pro I enter: new-host-2:~ Justin$ hostname And it returns: new-host-2.home Why is this when it says in setting/sharing my computers name is "Justin's macbook pro" and computers ...
1
vote
2answers
757 views

How do I grep a file in a smb mount point without using mount or fstab?

I don't have permission to mount a smb share with the mount command or by using /etc/fstab, but I'm able to use the smb protocol in Nautilus (smb://10.1.1.1/share), for example ... s Is it possible to ...
0
votes
1answer
1k views

Delete all 'nohup.out' within a directory recursively

How can I delete all 'nohup.out' files within a directory recursively from my terminal? I'm using CentOS.
4
votes
3answers
361 views

Preserving color output with cut

Using bash interactively I am trying to use cut to prevent the lines from going longer than my terminal width. But when using a command with colorized output all the color gets removed by cut. For ...
3
votes
2answers
100 views

Command prompt switches to >, what does this indicate ?

Sometime I have observed that when I type a character at the command prompt such as the one shown below I get a > . root@ubuntu:/home/heena# \ > I observed even the following works fine: ...
17
votes
9answers
2k views

How to make sure that a command is not interrupted, even if terminal is closed? [duplicate]

In Linux. Say I want to run a command and it takes too long. I just want to ensure it's done. How?
2
votes
1answer
60 views

What is the algorithm that the `iw` command uses for choosing an Access Point for a given Wifi network?

Suppose I am in an area with a lot of Wireless AP's for a particular SSID. If I run the command sudo iw dev wlan0 connect <ESSID> How does iw decide which AP to connect to? It does not seem ...
5
votes
5answers
20k views

Pass the output of previous command to next as an argument

I've a command that outputs data to stdout (command1 -p=aaa -v=bbb -i=4). The output line can have the following value: rate (10%) - name: value - 10Kbps I want to grep that output in order to ...
0
votes
3answers
1k views

How to compact a chmod UNIX command

Is there anyway to compact the follow UNIX command: chmod 755 scriptA.ksh | chmod 755 scriptB.ksh | chmod 755 scriptC.ksh | chmod 755 scriptD.ksh The above command makes every KornShell (ksh) ...
2
votes
1answer
46 views

'which' reports one thing, actual command is another [duplicate]

I am running Ubuntu 12.04, which came with Cmake v 2.8.7. I had need for a more current CMake, so I downloaded the source for 12.8.12.1, built, and installed it per directions. The last step, make ...
0
votes
0answers
20 views

Multiply 2 array index variables shell programming [duplicate]

How do i multiply 2 array index variables given the following foo=(1 2) bar=(0.1 0.2) foobar=$((foo[1]*price[1])) # this is wrong echo "$foobar" Current output : 0 Correct/Expected output : 0.4
6
votes
1answer
445 views

shebang line not working with cr-lf

Why are the shebang parts of the following elementary scripts not working: $ cat hello.sh #! /bin/sh echo Hello $ ./hello.sh bash: ./hello.sh: /bin/sh^M: bad interpreter: No such file or directory $ ...
5
votes
4answers
4k views

How to randomly sample a subset of a file

Is there any Linux command one can use to sample subset of a file? For instance, a file contains one million lines, and we want to randomly sample only one thousand lines from that file. For random ...
7
votes
4answers
5k views

Easy way to paste command line output to paste bin services?

Are there any command line tools on Linux that allow you to post output from commands or text files directly to a sharing service such as pastebin.com?
1
vote
1answer
181 views

Does cron impose some limitations to types of commands and privilege of execution? [duplicate]

I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via cron don't seem to work at all. So my question: ...
2
votes
2answers
1k views

Is it possible to execute the result of wget as a command?

I have 10 VPS machines and all of them have to run this one script that I need to change often, but I don't want to change it at 10 places, every time I need to make a change. I put the script as a ...
1
vote
2answers
593 views

Error Installing “ia32-libs” to run ADB and Fastboot Linux Mint 16 “Petra”

I have been trying to get adb, fastboot, avd and others to work with the latest version of Linux Mint (16 "Petra") I originally got this error when trying to run ADB: ➜ platform-tools ./adb ./adb: ...
1
vote
1answer
1k views

check internet speed from terminal? [duplicate]

How can I get the speed of my internet connection from the terminal? Is there any script or commandline application(s) available? I'm using CentOS 6.5 .
2
votes
1answer
465 views

How to connect to virtual /dev/ttyX from same machines pts terminal?

I want to get output/input from /dev/ttyX console (normally accessible directly using keys ctrl+alt+FNr, where Nr is number of /dev/ttyNr: ctrl+alt+f4 access /dev/tty4). I want to view and control ...
1
vote
0answers
585 views

Console Terminus Font Size in Slackware?

I am running Slackware 14.1 mostly from the command line on a 1366x768 monitor (using a vesa mode appropriate for the resolution, 0x34c if it matters, giving me a screen resolution of 1366x768x32 in ...
2
votes
1answer
388 views

Replace spaces and tabs at the end of the line in all files

I need to replace all unwanted spaces in all files from the current directory and from directories from the current directory (recursive search). I define the unwanted spaces the spaces and tabs that ...
1
vote
2answers
54 views

How to search for available software in repositories though CLI?

I want to be able to search all available software like one would using "Synaptic Package manager" or "Ubuntu Software Center" through Command Line.` I want a better way than pressing Tab after ...
1
vote
1answer
2k views

How to change camera info in Exif using command line

I have analog camera and I give a film to the lab where they scan it, I wanted to upload it to flickr but want to change info about camera. Right now it's NORITSU KOKI QSS-32_33 and I wanted it to be ...
1
vote
1answer
88 views

Mysql import the most recent file from a directory

I have a directory with daily backups of my entire MySQL database. I want to import the most recent backup into the database. I know to import a backup I need to use mysql -u root -ppasswordhere ...
2
votes
3answers
2k views

Can't cat a file or make a directory: contradictory output?

I am getting output from a terminal in Ubuntu 12 that I don't understand. $cat sublime no such file or directory $mkdir sublime cannot create directory 'sublime': File exists How can both of these ...
4
votes
2answers
161 views

Are nautilus and command-line commands the same?

When I copy, move, or delete a file in Nautilus or using the corresponding commands (cp, mv, or rm) does the same tool perform the action behind the wraps? I ask because nautilus tends to hang on big ...
1
vote
1answer
117 views

What's the practical difference between `command` and $(command)? [duplicate]

Both give the output of the command, so what is the semantic difference between the two? Some reading led me to suspect is that $(command) is Bash syntax, and the back quotes are integrated into Unix ...
7
votes
3answers
376 views

what is meant by vi and emacs editing modes [duplicate]

What is meant by "Enabling command line editing and vi and emacs editing modes"? I know vi is an editor and have used it as well, but what and how is it related to command line editing bamboozles me. ...
2
votes
3answers
2k views

Linux empty buffer cache command permission denied

I'm using the following commands to flush cache: # sync; echo 3 > /proc/sys/vm/drop_caches # sync; echo 2 > /proc/sys/vm/drop_caches # sync; echo 1 > /proc/sys/vm/drop_caches When I use ...
2
votes
3answers
471 views

What command do I use to see the start and end block of a file in the file system?

Is there any command that will output the beginning and ending blocks of any file?
1
vote
4answers
3k views

Firefox or Chromium command-line arguments to set fullscreen and control start page

On http://susestudio.com/, there's an option to enter custom command line scripts. How do I write one that changes the default homepage and sets the browser full screen?
1
vote
1answer
242 views

Mount home partition on user login

I got a VPS with a user dedicated to store my files. As i am aware of the current situation with the NSA and many other governments, and my VPS is hosted on a doubtful country i would like to ensure ...
3
votes
1answer
496 views

How does the piping in this command ultimately achieve to kill the process?

I have seen the following line in a bash script for killing a process(in this case started with the command loadgen): ps xww | grep -i "loadgen" | grep "PATTERNMATCH_FACT.xml" | cut -c1-5 | xargs -i ...
0
votes
2answers
880 views

How to get sound intensity of an audio input through terminal?

I want to know the intensity of the sound being heard by an audio in source like a mic or Line-in through Command line. Kinda like the progressbar under the mouse but in CLI. audiointensity mic0 10 ...
0
votes
2answers
158 views

zsh: What does the command “time + number” do in zsh

When I type time + number in zsh: # atupal at local in /tmp/atupal/setup/bin [10:01:49] $ time 1 /tmp/atupal/setup/bin/lib/python2.7 # atupal at local in /tmp/atupal/setup/bin/lib/python2.7 ...
4
votes
4answers
1k views

How to show network adapters with their statistics?

Is there any terminal command I can use to display all the network adapters like eth0, wlanoand their data statistics like data transmitted & received?
2
votes
1answer
1k views

Cannot remove iwlwifi module, even though interface is down

When I run the following two commands, the first one returns without eror, but the second one gives me FATAL: Module iwlwifi is in use. sudo ifconfig wlan0 down sudo modprobe -r iwlwifi If bringing ...
5
votes
1answer
2k views

Wi-Fi with WEP from command line in Ubuntu 12.04, Kernel 3.8.0-29-generic

I have removed network-manager and am trying to configure Wi-Fi with WEP manually. I am running on an X1 Carbon. Here are the commands I am running: ifconfig wlan0 down iwconfig wlan0 essid ...
4
votes
1answer
5k views

How do I install Awesome Windows Manager in Terminal?

Right now I'm running on Kubuntu and I'd like to install Awesome Window Manager in terminal. I've used Xmonad but I'd like another window manager, but don't know how to install "Awesome" from the ...
4
votes
2answers
69 views

Using newline delimited list as parameter

There have been several situations where I have had some output such as thing1 thing2 thing3 But have wanted to do something like: *command* thing1 *command* thing2 *command* thing3 An example ...
1
vote
1answer
55 views

Get current output

This just crossed my mind. Let's say that I'm operating a remote machine via SSH and I executed a make command to, e.g. build a new kernel for my machine. While I'm logged in that session, I can see ...
-2
votes
1answer
95 views

how do I make a $VAR empty so it don't effect the command line argument and still be within that argument?

This is the basic setting for hsetroot for it to work: hsetroot -center /path/to/image/ - setting the wallpaper with just that the picture. To use these options, just one has to be place within the ...
0
votes
1answer
75 views

How do I see the contents of a drive in Debian command line?

I want to see what is on a drive so I can satisfy myself that it can be disconnected (unmounted?). This is a vm on ESXi with 3 datastores - first is the ESXi local storage, second is a nfs share on a ...
5
votes
1answer
67 views

how to input this command line

hume@linux-o1dm:~> gnomesu -u legum java -jar '/home/legum/frem/frem.jar' Unknown option -jar I want -u for gnomesu and -jar for java, but the openSUSE treat -u -jar only for gnomesu. What is ...
4
votes
1answer
446 views

Executing a remote command on SSH connection, before login

I am trying to find a way to execute a specific command when connecting to a server via SSH. By this I mean, the command will execute unconditionally on opening a connection, so this would preferably ...
-3
votes
1answer
70 views

Why is learning command line imporatant? [duplicate]

I googled this question many times but could not find a good reason why the knowledge of command line is important.Some say GUI cannot be used always but there are no examples supporting their ...
3
votes
3answers
1k views

How to move the first x files

I have this huge folder with thousands of unordered files. Is it feasible to move the first 5000s to a subfolder via the mv command? For now I move files with mv *some_pattern* ./subfolder1/ ...