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

learn more… | top users | synonyms (4)

3
votes
2answers
457 views

How do I know if apt-get is going to do a partial upgrade?

I often update my system with apt-get update && apt-get dist-upgrade. This caused me a few problems with natty and nvidia drivers. Someone on IRC told me that's because I did a partial ...
4
votes
2answers
5k views

How do you set the title of the active gnome-terminal from the command line?

Is there a way to set the gnome-terminal title from within the terminal itself without having to right click on the tab. Something like: active-terminal --title "Foo" There was a related question ...
1
vote
1answer
87 views

Can I get application changelogs using the terminal?

In order to look at changelogs for recently updated applications, I use Synaptic. Is there a way for me to get specific application changelogs using the terminal?
2
votes
1answer
389 views

Is there a way to grep the gnome-terminals history?

Is the terminals output (i.e. not commands) history hiding somewhere that lets me do something like.. grep "foo foo \d{5}" ~/.terminal I'm aware I can simply pipe stuff to grep, or save it to a ...
2
votes
3answers
233 views

Teminal non-responsive on load, can't enter anything until CTRL+C

I have an issue with terminal in Ubuntu 10.04. When I launch it, it hangs, like this: I cannot do anything until I press Ctrl + C: I cannot remember when this started. What can be wrong? Looks ...
6
votes
1answer
6k views

How do I start “Ubuntu classic desktop” (no effects) from the command line

I am able to run sessions over an ssh connection but I rather use the "Ubuntu classic desktop (no effects)" version on Ubuntu 11.04 instead of the new Unity since I don't have 3d support on the laptop ...
1
vote
3answers
4k views

Replace string in bash script

I tried the following command in my script: find=grep "$jasper" jasperreports.properties | awk -F"reports/" '{print $2}' Example output: maps I want to change this output to something else, e.g. ...
14
votes
2answers
2k 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” ...
1
vote
0answers
419 views

Copy directory to external HDD [closed]

i'm trying to copy a directory to external HDD- i mounted the device and then typed : cd root tar -cf - * | (cd /mnt ; tar -xpf -) i got this error message: "cowardly refusing to create an empty ...
5
votes
1answer
839 views

Command to determine whether a fullscreen application is running?

I have a small shell script that plays a little jingle and displays a notification whenever I get a new email. The problem is that this shell script can get invoked anytime - including when I'm ...
1
vote
2answers
88 views

Changing from one file to another

I'm told to go to /home/jbander/Downloads, so how do I do that, I assume you do it in terminal but what do you do next, I can get to home but that is it. How do I go from one directory or file or ...
1
vote
1answer
1k views

Can I modify power-management settings on a laptop running Ubuntu Server?

It's my first time running ubuntu server and I'm trying to figure out a way to prevent the machine from going into suspend mode (I'm guessing) when the Lid is closed on the Laptop. Is it possible to ...
4
votes
2answers
235 views

List Linux kernel markers in alphabetical order

How can I get an alphabetical list of kernel markers from command-line?
0
votes
1answer
625 views

How to work around the home directory changing to /root when using sudo?

With Natty coming out soon, I've been at work updating my deployment and self-config script to make my desktop on 11.04 run and look the way I want it to. One bummer is that dbus seems to have ...
3
votes
1answer
625 views

FFmpeg or GStreamer for command line conversion of audio files?

I think I'm mixing up and I need some one to clarify things for me! What is the differences between GStreamer and FFmpeg. What I need is a command line to convert file(s) from one format to another. ...
2
votes
4answers
194 views

OS evaluate in bash script

i was thinking in way that before run my script , evaluate which operating system that user use ubuntu or solaris , am using this because there is some differences in command option in each OS ...
25
votes
8answers
13k views

Torrent client for the command-line?

Yesterday one of my friends asked me, if there is some torrent client, that runs on the command-line. I have no answer for him, but I think that you have it.
3
votes
2answers
5k views

Read file into array

How can I read file in shell script , then assign each line to an variable that i can use later ,,,(am thinking in way to load an default setting from file) i already try : process (){ } FILE='' ...
9
votes
2answers
359 views

How to tell what applications are accessing the hard drive and how frequently?

My hard drive is going crazy and I don't know what application is doing it. Are there any linux tools for profiling what processes are accessing drives and how frequently? top, htop and the like ...
22
votes
6answers
11k views

Browsing the internet from the command line

How can I browse the internet from the command line in Maverick?
7
votes
3answers
9k views

How do I access a mounted Windows share from the command line?

I use Places > Connect to Server... to connect to a Windows share in my work environment (requires Kerberos authentication). When I do so, I can access the Windows share via Nautilus, but I can't ...
2
votes
1answer
803 views

Optimize video filesize without quality loss

Is there a simple way (on the command line - I want to write a script which compresses all videos in a folder) to reduce the filesize of a video (almost) without quality loss? Is there a method which ...
2
votes
1answer
3k views

Get drive information [duplicate]

Possible Duplicate: Which hard disk drive is which? How can I get more information about devices? For example how do I determine what /dev/sda1 is?
1
vote
1answer
813 views

How to get nicer error-messages in this bash-script?

I'm trying to catch any error when run a command in order to write a log-file / report I've tried this code: function valid (){ if [ $? -eq 0 ]; then echo "$var1" ": status : OK" ...
4
votes
3answers
5k views

How to check if a command succeeded?

Is there any way to check if there is an error in executing a command? Example : test1=`sed -i "/:@/c connection.url=jdbc:oracle:thin:@$ip:1521:$dataBase" $search` valid $test1 function valid () { ...
8
votes
2answers
2k views

Is it possible to copy a file into a zip archive?

I want to copy a file into a ZIP or JAR archive. Is that possible? If so how?
3
votes
1answer
392 views

Problem manipulating text using grep

I want to search for a line that contains log4j and take 7 lines before and 3 lines after the match. grep -B7 -A3 "log4j" web.xml After that I want to add comment tags before this paragraph and ...
2
votes
1answer
390 views

Script to download music and transfer to Ipod?

I need help making a script that would do this This is what I would do manually in terminal (I will be using the .getmusic script from 360 percents to download myspace music): cd /home/eric/Music ...
4
votes
2answers
2k views

How can I read user input as an array in Bash?

How could I read user input as an array? :)
4
votes
1answer
208 views

Automation Extracting Many Passworded Archive

I have many 7zip Archive with same password. When I extract it, both using GUI application and command line, I must enter same password again and again. When I read the 7za command manual pages, I ...
2
votes
1answer
287 views

How can I connect to a specific NTP server?

I have an NTP server I want to connect to. I know its IP address. How can I connect to it through the command line?
3
votes
2answers
3k views

How do I provide a username and password to wget?

I've tried to connect to a server via wget: wget http://<user>:<pass>@serveradress But wget responds: invalid port I know that the server accepts incoming traffic at port 80. How can I ...
7
votes
4answers
2k views

Display the first few lines of a file

I have a folder with quite a few files in it. I want to display the following: filename_1 first line of file1 second line of file1 third line of file1 filename_2 first line of file2 second line of ...
2
votes
2answers
1k views

image viewer: png vs gif

I have a bunch of files that have .png extension. However, some of them are actually gif files. Any of the files, I can open them w/ gimp or view them in firefox, but when I try to open them with ...
4
votes
1answer
4k views

How do you change the default shell for ALL USERS to bash?

I want every new user from now on to have bash as their shell by default. I know that to change your own shell to bash, you would use the command "chsh -s /bin/bash", but how do I automatically set ...
3
votes
2answers
554 views

wget has a 4 second delay

I have tried to wget a page with windows/mac, and the response is instant while the the Linux application delays for 4 seconds before it shows the response. The command I ran is: wget ...
2
votes
1answer
196 views

Anomaly with bash PS1 definition

My root and admin user both have the same .bashrc file. The prompt section of the .bashrc is the following: if [ "$color_prompt" = yes ]; then ...
2
votes
2answers
1k views

Sed problem in a Bash script

I'm having a problem using the sed command . I'm trying to write a bash script that does the following : search for the line that contain :@ then save the line that contained :@ and replace it ...
6
votes
5answers
847 views

Best Way To Start Learning Shell Commands in Terminal?

What's the best way to learn how to use System Administration / using shell-commands in the Terminal?
11
votes
4answers
648 views

How to jump to the end of a 'man' page

When I open up the manual for a command (man wget for example) the manual can be many hundreds of lines long. How can I get: to the end of the manual quickly and back to my terminal prompt?
4
votes
1answer
398 views

How can I find the value of the “Visual Effects” setting using the command line?

On 10.04 (and other versions, but I am asking about 10.04), going to System ➜ Preferences ➜ Appearance and selecting the Visual Effects tab shows possible values of None, Normal, and Extra. How can I ...
2
votes
1answer
3k views

Run simple bash script to start applications at login

I want to run a simple bash script automatically when I log in. For example #!/bin/bash echo "start spotify" gnome-terminal -e spotify --title spotify When I run this command, one gnome-terminal ...
1
vote
1answer
849 views

Why is this rkhunter script sending empty emails?

I have started running rkhunter (a security monitoring tool) and I have finally managed to clear all of its warnings. Now, a cron job runs every day to monitor my machine. Rather than send me an ...
1
vote
3answers
551 views

How to redirect output of jobs in background?

ping6 ipv6.google.com & After I type this in the terminal, the command is ran in the background. However, it stills generate the output to the foreground, and print the result to the terminal. ...
1
vote
2answers
3k views

How to redirect output of a C++ program to a file? [closed]

I have a quick question: I have a C++ program that prompts the user for inputs, accepts those inputs, does things based on the inputs, and displays the results (everything is being displayed to the ...
9
votes
3answers
4k views

How can I reduce the number of TTYs?

I don't need 7 TTYs (or do I?). So how do I reduce this number to 3?
18
votes
3answers
761 views

Why is the default virtual terminal number 7?

Why is the default virtual terminal in ubuntu tty7? is there any sort of precedent for this, or was that just the number that first came to mind?
0
votes
1answer
653 views

Changing the default installation path to a newly installed hard disk

I am currently working on a dual-booted PC. I am using Windows XP and Ubuntu 10.04 Lucid Lynx released in April 2010. The allocated partition to Ubuntu that I am making use of has almost exhausted. ...
15
votes
2answers
4k views

How to grep 2 or 3 lines, one containing the text I want, and the others just below it?

This is a snapshot of error log: 06:16:29,933 ERROR EmailRMManager$:45 - Exception In get Message com.rabbitmq.client.AlreadyClosedException: clean connection shutdown; reason: Attempt to use closed ...
13
votes
6answers
5k views

Is there a tool to encrypt a file or directory?

What's the most popular way to do that?

1 55 56 57 58 59 65