Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (5)

18
votes
5answers
13k views

Script to display all terminal colors

Throughout the internet I have seen many people with scripts that prints out a bunch of stuff in all the colors defined in ~/.Xdefaults. However when I try to use these, I always get error: Bad ...
4
votes
4answers
191 views

How do you make your terminal play a sound or offer a notification when it has finished executing its command?

I do sudo apt-get update from time to time, and find it frustrating to have to check when it is done doing its thing. Is there anyway I can get it to offer a notification popup or play a sound when it ...
2
votes
1answer
14 views

Differences between “<command> < /dev/null &> /dev/null & disown” and “nohup <command> & disown”

This is my understanding about the usage of &, disown and nohup: <command>: runs the process within the Terminal's current bash instance, in the foreground (i.e. the process is listed as a ...
2
votes
1answer
31 views

Can I emulate graphical DOS applications inside a TTY?

Can I play DOS games inside a hard terminal (like the ones that open with Control+Alt+F1)? I want to be able to close the Xsession because the PC I'm doing this is on is really slow. The PC has ...
-1
votes
2answers
18 views

When to use adduser or useradd

The Question consist of three parts What are the differences between them When to use adduser or useradd and why there is more than one command for the same purpose
0
votes
3answers
22k views

How do I use the “cd” command?

I am using Precise pangolin. So far as I know, commands like cd.. or cd- are used to browse through folders in the terminal. But whenever I enter one of this commands, it gives an error ...
5
votes
1answer
39 views

How do I restart a wget download?

I use the wget application. One file has stopped downloading. How can I stop the download and start the download again? Here's the log for wget $ tail -f wget-log 287350K .......... .......... ...
4
votes
1answer
4k views

List of files modified between perticular time period

I am trying to get list of files modified between particular period of time as explain in this answer. I stored date and time in two variables [nn and nn1 (stupid naming)] and tried with find ...
1
vote
1answer
25 views

When one disables the root account via the terminal, what output can one expect?

When I used Ubuntu for the first time, my friends told me to enable the root account, and I enabled it. But, I know that I already reinstalled Ubuntu few times, but in this last time, I don't know if ...
6
votes
5answers
232 views

Exit terminal after running a bash script

I am trying to write a bash script to open certain files (mostly pdf files) using the gnome-open command. I also want the terminal to exit once it opens the pdf file. I have tried adding exit to the ...
0
votes
3answers
33 views

Get Parent ID of last process executed in terminal

back to this How do I find the PID of the last open file in terminal? I want to know the PPID (parent id of the process) of the last executed process.
0
votes
2answers
51 views

Moving folders in Terminal [duplicate]

I'm trying to move a folder into another folder in terminal, but when I enter this line: mv South_America /North_America South_America just completely disappears. It didn't move into the ...
25
votes
3answers
34k views

Why does “ps aux | grep x” give better results than “pgrep x”?

I've just tried the following command on my Ubuntu, it doesn't show a thing: pgrep php5 shouldn't it return the process id of php5(which the following command just does)?: ps aux | grep php5 So, ...
8
votes
5answers
737 views

How do I list all sudoers?

I want a command to list all sudoer users in Ubuntu 12.04. In other words, how could I list all users who have sudo ability? Suppose I'm a sudoer user. How could I know all other sudoer users?
0
votes
1answer
30 views

How do I find the PID of the last open file in terminal?

How to know the PID of the last open file (process) using the command line?
3
votes
1answer
36 views

Find the properties of an mp3 file via command line

Is it possible, via command line (shell command), to check for properties of a file (like when I right click on a file via Nautilus). Specifically, given an mp3 audio file, I would like to know how I ...
0
votes
1answer
18 views

How to compare float variables in awk?

awk -F, 'NR==FNR{c[$29]=$29;next} NF{print $29 ((c[$29]==$29)?" ":",mismatch")}' $file1 $file2 The value of 29th field, i.e., $29 in file1 was 832.9 and that of file2 was 832.9000. If I compare them ...
2
votes
2answers
2k views

How I can set-up LXTerminal in Lubuntu to start maximized?

When I push CTRL + ALT + T I want see my default LXTerminal in Lubuntu 13.04 in full size (not like F11). I know that I can push CTRL + ALT + F1 and get tty-terminal - it good for some situations, but ...
2
votes
0answers
27 views

/bin/sh: 0: can't access tty; job control turned off

I'm building a custom image to run on a simulator. the kernel boots fine and everything but generates this warning: /bin/sh: 0: can't access tty; job control turned off and the terminal does not ...
2
votes
3answers
152 views

Error when running script in bash

I wrote a script in bash to basically create aliases, but for any reason, it doesn't work in some cases. Here it's the code: #!/bin/bash #Script to create unique and permanent aliases _add_alias() { ...
19
votes
3answers
20k views

How to exclude/ignore hidden files and directories in a wildcard-embedded “find” search?

Starting from (notice the wildcards before and after "some text") find . -type f -name '*some text*' how can one exclude/ignore all hidden files and directories? I've already been googling for far ...
14
votes
4answers
16k views

How do you change brightness, color and sharpness from command line?

I am controlling my PC with SSH and scripting. How can i change the brightness, color and sharpness from command line? Try 1: failed $ sudo redshift -t 5000:5000 -g .5 Cannot list GNOME panel ...
79
votes
14answers
109k views

How to check battery status using terminal?

I would like a command that check the battery status through the terminal
4
votes
1answer
40 views

How to batch process JPG images to change its quality with Nautilus-Actions?

First of all: Thank you for taking the time to read this and provide some help. Any advices are appreciated. I am using Nautilus-Actions in order to add a custom context menu's action in order to ...
0
votes
1answer
18 views

I seem to not have a terminal [on hold]

I am not able to find the terminal, even when I press Ctrl+Alt+T, could it be because it didn't download with my OS? Or is it something else? I am running Ubuntu Unity, and this I am a newbie.
2
votes
2answers
198 views

How to output the linux command and the returned result in the same text file?

All the commands I've seen so far look like command > file or command >> file, which output the result to the designated file. For instance, when I type openssl version > lab4.txt, all I ...
5
votes
1answer
80 views

What do these commands from a shell script do?

I'm just starting to learn bash. I have the following script, and I would like to know what does the following commands do in order to start to understand a little bit this world. if [ ! -w "." ] ...
5
votes
7answers
10k views

Can't search for terminal in Unity dash

I used to be able to search for terminal in 'Dash Home' and brings up terminal. However, this way doesn't work any more. 'Dash Home' does not even let me search for 'terminal'. One thing, I have my ...
0
votes
1answer
25 views

How to copy and paste a file through the command-line? [duplicate]

I want to copy and paste a file to /usr folder but I guess I need root access to do so so I need to learn how to copy and paste a file from one location to another through the terminal.
0
votes
1answer
22 views

.bashrc edit messes up terminal command arrow-up history print

I wanted to give my terminal prompt in Ubuntu a more personal look, and wanted to change the text prior to the '$' when writing a command. From what I've found this is done by editing the .bashrc ...
2
votes
2answers
112 views

incorrect work gnome terminal

I use at work Ubuntu Desktop 12.04. 80% of the time I spend in the terminal. After switching from the putty on gnome terminal, I was unpleasantly surprised to work with some devices (eg Extereme ...
3
votes
1answer
74 views

Can't see my files with “ls” anymore

HELP! I think I broke my DESKTOP :/ I was playing around with the Terminal and trying to practice moving, renaming, and copying files when I think I screwed something up. I was attempting to move ...
0
votes
0answers
50 views

/usr/bin/ld: cannot find -l

I wannt to install a program on my Ubuntu (Ubuntu 12.04) but when I type "make" in Terminal, it has errors: /usr/bin/ld: cannot find -lgeant321 /usr/bin/ld: cannot find -lkernlib /usr/bin/ld: cannot ...
4
votes
1answer
284 views

How do I completely clear a terminal window

The commands of clear, Ctrl+L, or reset are not adequate. They do not clear my terminal screen, they just seem to scroll the window down so I can't see everything above. I want it so that I can't ...
0
votes
1answer
97 views

How do I move a subfolder with contents to a different source folder without copying?

I know it's been asked a million times, but I can't find the answer to what I'm trying to do specifically. Here's the directory structure: Main Folder1 | |-Subfolder 1 |-Subfolder 2 ...
0
votes
2answers
57 views

Use of “cp” command between root user's home and plain root

How do I use the "cp" command to copy files from root@pcname:/home/username # to root@pcname:~ # I have been able to use the mv command to move a file, but when I use cp, it tells me that the ...
1
vote
3answers
42 views

mv command with *-wildcard shows error “No such file or directory”

I have 6 .txt files on my desktop that I am trying to move using the Terminal. However when I try to mass move them all into the texts folder that is on my Desktop, I get the the following error: mv: ...
2
votes
1answer
36 views

How do you add/remove applications to/from the Unity Launcher from command line?

I am customizing an Ubuntu 14.04 Live CD with UCK (Ubuntu Customization Kit). The program gives you a chroot environment in a terminal to make changes. I want to add and remove what programs appear ...
2
votes
1answer
86 views

Adding my launcher to the Unity Launcher automatically. How?

Based on official documentation: In order to add your launcher to the Unity Launcher on the left, you select and drag it onto the Launcher panel. Alternatively, you can place your .desktop ...
4
votes
3answers
218 views

How to make an icon to enter terminal commands

Let me start by saying that I'm very new to Ubuntu in general, so I realize this may be a basic question. I'm using xubuntu 14.04. I recently got a wireless usb working by following the steps here. ...
9
votes
4answers
4k views

How to display time elapsed since last system boot using “uptime”?

I want to display the time elapsed since last system boot using uptime, but I don't want it to display all that info. I just want to know how many hours passed since last system boot (i.e. : 18:17:59) ...
4
votes
1answer
55 views

How to reset errornous font in promt and output of gnome-terminal

I'm experiencing replacement of all occurances of certain characters in the prompt and output of gnome-terminal (3.6.2 in Ubuntu 14.04), e.g. (latin d is replaced with some kind of uppercase D in ...
1
vote
2answers
167 views

“find: missing argument to `-exec'” when using “-exec rm -f {}\”

I run this command: ~/shell_temp$ find . -type f -name "IMAG1806.jpg" -exec rm -f {}\ i got output below: > IMAG1806.jpg Error: find: missing argument to `-exec' what is exact command for ...
0
votes
1answer
15 views

Problem installing Terminology terminal emulator

When trying to run/install Terminology on Ubuntu 14.04 I get the following error symbol lookup error: /usr/local/lib/libecore_evas.so.1: undefined symbol: _eina_log_state_shutdown I guess the ...
0
votes
0answers
16 views

How to run a script when a directory is changed by another user?

I know has been a bit of discussion about topics similar to this. But here is what I am basically trying to do. I have a watch directory called and whenever a file is added to that directory, I want ...
1
vote
1answer
40 views

Terminal commands for volume [duplicate]

I have a very simple question: What is the terminal command for changing the volume? I ask because I want to set a keyboard shortcut via the keyboard settings and I need the terminal command for it.
3
votes
0answers
50 views

Configure Linux Text mode Size (Rows and Columns)

I'm having issues with controlling the size of a text-mode program. This is a database program (Dataflex) that I recently had working on Windows 98 DOS mode and now am moving it to Linux. I have ...
2
votes
2answers
4k views

How do I list word count in multiple files?

Say I need to find out how many words are in each file that have the word 'work' in it. I know that to find files with 'work' in it, it would be ls work. And to figure out the number of words it ...
2
votes
1answer
36 views

How to display completed print jobs with source URL

In the "view queue" GUI of my printer, I can click "show all completed jobs" and get the columns Job|User|Document|Printer|Size|Time Submitted|Status I hunted around for some way of doing this in ...
0
votes
0answers
26 views

Installing Missing Commands [duplicate]

I am trying to learn linux commands and one particular thing I could not seem to find was; say a command like "split" is missing, how would you install it?