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

learn more… | top users | synonyms (5)

21
votes
5answers
3k views

Displaying a “scrolling” log file

Via command line, I have a log file I'd like to keep track of. What I want is to have, basically, a tail that refreshes when the log is updated making the text scroll upwards as new lines are ...
21
votes
6answers
16k views

Command to see media file info in terminal?

I need a command to quickly see in terminal essential information about an audio or video file. (Then I'll consider adding that to Thunar's custom actions, etc.)
21
votes
4answers
3k views

Can one pick up a running application from terminal?

Sometime I need to run an application from terminal for debugging. If I am sure the bug will occur short after launching the application, I can run this application from the Terminal. However, bugs ...
21
votes
5answers
1k views

How to view multiple files in single terminal?

Sometimes I may need to access multiple log files for troubleshooting , but I don't want to open them in different terminals. What I want is to open them in same terminal. Is there any way I can ...
21
votes
4answers
21k views

Take a picture from terminal

I want to be able to take a picture using the webcam from the terminal. this image then will be send to a specific directory. How can this be done.
21
votes
3answers
15k views

Bash history handling with multiple terminals

I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes ...
21
votes
1answer
234k views

How to copy files via terminal?

I have read about copying files with terminal but these examples will help me a lot. So here is what I want to do: Examples: I have a file in /home/levan/kdenlive untitelds.mpg and I want to copy ...
21
votes
2answers
15k views

How to edit pdf metadata from command line?

I need a command line tool for editing metadata of pdf-files. I'm using a Aiptek MyNote Premium tablet for writing my notes and minutes on this device, import them later and convert them to pdf ...
21
votes
2answers
1k views

Does using -v (verbose) slow commands down?

In this question: How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash? it is asked how to delete all file in a folder, and not the folder itself. Matts ...
21
votes
3answers
5k views

What is the maximum length of command line arguments in gnome-terminal?

What is the maximum length of command line arguments in gnome-terminal? ... and is there a system environment variable which reports this value?
21
votes
6answers
20k views

Can I use NetworkManager without a tray/dock/bar?

I would like to use NetworkManager, but prefer a keyboard driven window manager that provides as much space on the screen as possible for my code. I just hate that little strip of real estate "trays" ...
21
votes
2answers
16k views

How do I disable the blank console “screensaver” on Ubuntu Server?

How to disable blank screensaver on Ubuntu Server? There's no desktop or X, only console (command-line interface).
21
votes
1answer
5k views

How do I pipe terminal standard output (stdout) to the clipboard?

For example, Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see. I realize I could do ls > filename.txt to create a file (filename.txt) ...
21
votes
2answers
26k views

How do I extract a password protected .7z file?

Can someone tell me how can I extract a password protected .7z file in Ubuntu server? (I know the password, I just need a program to do so and an example of how to use said program...)
21
votes
1answer
41k views

How do I change the language via a terminal?

Using system settings I changed my language to Arabic and deleted the English language from the settings. Then the computer lagged and it logged out - now I can't log back in because the login is in ...
20
votes
5answers
2k views

How to both display a command line's output on console and save the output into a text file?

How can I run sudo apt-get install by BOTH seeing the process of installation (long in my case) and saving its output into a text file ?
20
votes
4answers
3k views

Why wouldn't `which` command work for `cd`? Can't find the executable `cd` too!

I tried which cd and it didn't give a path but instead returned the exit code 1 (checked with echo $?). The coreutil cd itself is working, so the executable should be there right? I also ran a find ...
20
votes
3answers
2k views

Ctrl+L in terminal

I accidentally typed ctrl + L in terminal and my terminal window jumped one 'screenful' size. I looked at the keyboard shortcuts in "Edit"->"Keyboard shortcuts" and didn't find that shortcut. What ...
20
votes
6answers
60k views

How to close vim from the command line?

I know this is more of a general linux question but w/e. So when I enter a program like vim in the command prompt it displays all the text in the file and I can edit it etc. But I can't figure out how ...
20
votes
3answers
28k 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, ...
20
votes
3answers
18k views

How can I convert a ppt to a pdf from the command line?

I have a folder containing a bunch of ppts, each of which I'd like to convert to an individual pdf. I'm using Ubuntu 10.04 with whatever comes installed on it.
20
votes
2answers
11k views

What do the various dpkg flags like 'ii' 'rc' mean?

I frequently need to check which packages are installed, and I use the following command: dpkg -l | grep foo which gives the following output Desired=Unknown/Install/Remove/Purge/Hold | ...
20
votes
10answers
14k views

Command line audio players

What are popular audio players for the command line? How to play a single sound file? Are there command line players that also index the music library like Banshee, Exaile, etc.?
20
votes
3answers
3k views

Where can I find the command line?

A basic question: Where do I find the command line? There is a lot of information about commands and using the command line, but I'm an absolutely new Ubuntu user: I can't find find the command line. ...
20
votes
4answers
3k views

What do “.” and “..” mean when in a folder?

when I used ls -a to view hidden files in folder there were 2 hidden files created by default what is the significance of this two files . and ..? ls -a Produces . ..
20
votes
2answers
2k views

How to change number of workspaces from command line?

I'd like to change org.compiz.profiles.unity.plugins.core -> hsize and -> vsize from command line. I thought I could use gsettings set org.compiz.profiles.unity.plugins.core vsize 4 but then ...
20
votes
1answer
15k views

How can I find out what RAM a computer system has?

I'm looking for a way to find out what kind of RAM a system has (clocking speed, DDR-X etc.). Is there a specific command for that? I'm only aware of free or lspci which don't offer those things.
20
votes
3answers
4k views

How to find the number of packages needing update from the command line?

I'm working on some system admin automation using fabric and I'd like to be able to monitor the number of packages that need upgrading on a given machine. This is the same information that I can see ...
20
votes
2answers
11k views

How can I hibernate/suspend from the command line and do so at a specific time

I managed to find out how to suspend/hibernate the system from the command line by reading How can I suspend/hibernate from command line?. However, I would like to know how to use the command line to ...
19
votes
5answers
2k views

Unable to remove a file which has a name like a command argument [duplicate]

I inadvertently created a file called -r in my home directory. Now I cannot get rid of it: rm -rf rm: missing operand Try 'rm --help' for more information. Other attempts: rm /-/r rm: cannot ...
19
votes
2answers
2k views

Why I can find *main.o but cannot *.o?

This one is correct: $ find . -name *main.o ./main.o So, why I can't find *.o? $ find . -name *.o find: paths must precede expression: main.o Usage: find [-H] [-L] [-P] [-Olevel] [-D ...
19
votes
8answers
48k views

How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash?

Is there a command to remove all files and subdirectories in a directory WITHOUT deleting the directory? For example if I have directory "dontDeleteMe" with subdirectories "1", "2", "3" and each ...
19
votes
3answers
122k views

find a file using the terminal

I am trying to find a directory, using the terminal and I am not sure where it is. I mean that i used the wget command to obtain the file and used it for installation and now i am not able to find ...
19
votes
2answers
1k views

How do I run an application with arguments from the command line without losing the terminal?

I use dwm as a window manager on Ubuntu, I like tiled windows and I like them as few as possible. I sometimes need to run an application (let's say it's the pdf viewer mupdf in x11) from the terminal, ...
19
votes
3answers
8k views

How to show ascii art at the top of the terminal when it's opened?

As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
19
votes
2answers
825 views

Why does it take so long for Ubuntu to say “command not found”

For some reason, with my setup, it can take Ubuntu several seconds to respond with "command not found" when I accidentally typo a command. Why does it take so long? Is there any way to shorten the ...
19
votes
5answers
948 views

What are shells?

What's a shell, their importance, types and functions?
19
votes
2answers
4k views

How does this [t]ricky bracket expression in grep work?

I saw this one-liner recently: $ ps -ef | grep [f]irefox thorsen 16730 1 1 Jun19 ? 00:27:27 /usr/lib/firefox/firefox ... So it seems to return the list of processes with "firefox" ...
19
votes
3answers
1k views

iPython Like Command History For Shell

For those of you who don't do python programming on ubuntu, ipython is a python shell on steroids, but it has this amazing feature that it not only autcompletes based on known names (i.e. the same way ...
19
votes
3answers
4k views

How do I search a PDF file from command line?

I'm checking references of a paper and want to find the positions in the body where some paper (in the references list) is referenced. Is there a PDF editor which supports search via bash and extract ...
19
votes
8answers
22k views

How does one find out the command line corresponding to GUI app (eg, LibreOffice Writer)?

How can I run LibreOffice Writer from the command line? Basically, what is its command and how do I get to know what's the command to run a particular application in general?
19
votes
3answers
4k views

“♦: command not found” in tty after login

I have this problem after upgrade Lubuntu from 12.10 to 13.04. I press Ctrl + Alt + 1, enter login, password, wait two seconds and get: ♦: command not found". After this message I can type commands ...
19
votes
4answers
2k views

CLI mounting vs. GUI mounting

On Ubuntu 12.10, when I want to mount a hard drive, I can just click on the unmounted drive and everything works fine (by mounting to /media/username/partitionlabel). Basically, I would like to do ...
19
votes
7answers
15k views

How do I toggle sound with amixer?

Including Natty I was always able to toggle (mute/unmute) the 'Master' sound volume with the amixer sset Master toggle command that I linked to an edge binding in CompizConfig-Manager. Now after ...
19
votes
7answers
23k views

How do I navigate to a samba location I've mounted in Nautilus on the command line?

Please note: I am two weeks old in Linux. I have found a lot of answers to this question on the internet, tried many, but all failed one way or another. Therefore I dare to ask once again in the hope ...
19
votes
2answers
3k views

How does Middle Click paste work?

I don't understand the middle click paste. Sometimes I highlight text, middle click in the window where I want it to go and it does what I want. Sometimes it doesn't. For instance, when I highlight ...
19
votes
2answers
38k views

How do I change mirrors in Ubuntu Server from regional to main?

I have a Lucid Server (10.04) set up and I would like to change the mirror from US (or any other country) to the Main Ubuntu Mirror. For example my two first entries in sources.list are: deb ...
19
votes
2answers
8k views

What does “%U” mean when calling a command?

When editing the Applications menu, I see for some applications, their commands have “%U” such as "gedit %U" and "gnome-mplayer %U", but others don't such as "gcalctool". I was wondering What“%U” ...
19
votes
3answers
848 views

Saving output of a grep into a file with colors

I need to save the result of a grep command into a file, but I also want the output file to be formatted and keep the colors just like in the terminal. Is there a way to do that? Maybe make grep save ...
19
votes
1answer
19k views

How to remove an alias?

I want to remove gs alias from my PC. When type gs it will open the Ghost Script. But I checked everywhere in the home directory .alias .bash_aliases .bashrc I also overwrite the gs with my custom ...