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

learn more… | top users | synonyms (6)

0
votes
1answer
109 views

apt-get update malformed line [duplicate]

when i typed sudo apt-get update in terminal, it gave me this error: E: Malformed line 1 in source list /etc/apt/sources.list.d/gazebo-latest.list (dist) E: The list of sources could not be read. I ...
1
vote
0answers
103 views

How to get my webcam working on Skype?

My HP webcam doesn't work on Skype. I have Ubuntu version 14.01 and I don't really want to buy an external webcam. Can anybody please help?
0
votes
1answer
178 views

Dvd md5 same as iso, sha1 and sha256 not

So here's my dilemma: i ran these 3 commands in terminal, one at a time, to check the hashes of a burnt dvd: dd if=/dev/cdrom bs=1 count='size' | md5sum dd if=/dev/cdrom bs=1 count='size' | ...
0
votes
3answers
193 views

Copy sub-directory from 1 directory to another

I need to make a copy of the content of one directory to another. I need to copy only 1 sub-folder. For example; if I have a folder called "from" and want to copy one of it's sub-folders (with all ...
0
votes
0answers
19 views

Command hangs when directed at a shared network drive [duplicate]

In an effort to become more familiar with ubuntu/linux, I have recently installed a VM with Ubuntu 14.04 on it. I mounted a shared network drive to my home directory, which is named ostenso. ...
0
votes
2answers
74 views

dpkg lock cannot be resolved [duplicate]

I get the following error: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another ...
0
votes
1answer
102 views

Match Pattern and write following value as variable

I'm trying to match a pattern and then pull the following information to create a file using that variable. Example (my data may look like either of the 2 examples) "headers": { ...
1
vote
1answer
97 views

My script only opens new terminals when the previous command's terminal is closed

Sorry if my title is a little hard to understand, I tried to condense the issue as much as possible. I'm trying to run a bash script which opens a new terminal for each major command, that way I can ...
0
votes
1answer
381 views

gsettings not working from within bash function

Pretty New to bash and only 6 months into ubuntu so please bare with me. Im creating a post installation script https://github.com/jjdemitriUk/relutionDev everything is going well so far its written ...
1
vote
1answer
1k views

SU setgid: PERMISSION DENIED, SUDO: PERM_ROOT 0, -1, 1 PERMISSION DENIED

Hi I have a problem that I cannot solve. I cannot log into root, su, or sudo. Everything works fine via ssh so I tried on ssh via putty: Set root password: sudo passwd Add user to sudo/admin ...
22
votes
3answers
7k views

How can I wake a sleeping bash script?

Is it possible to wake a process that is paused using the sleep command? As an example, lets say you have this script: #!/bin/bash echo "I am tired" sleep 8h echo "I am fresh :)" After 30 ...
2
votes
1answer
730 views

grep - highlight inside a highlight

I'm facing difficulties while trying to multicolor-highlight matches using grep's color environment. After I stumbled across Colored grep, I found it very useful to highlight multiple pattern in a ...
1
vote
3answers
796 views

Sudo command in bash script halts the script

I have an early 2009 iMac with a sensor problem. The ODD and CPU fans run at full speed. To get them down to minimum speed in Ubuntu I need to set the speeds in the Terminal, using this method. Rather ...
0
votes
1answer
367 views

I Ran startx From Terminal as SU Now I Can't Log In

I ran startx while in SU mode from terminal while already logged into Ubuntu desktop. This was probably really stupid, I know. The screen immediately went completely black. I rebooted, now every time ...
0
votes
1answer
84 views

Where does my installed file reside

When I do sudo apt-get install openvpn ... it does not install the file rather it downloads a file and stores some where . Now how can I find where the file has reside.
0
votes
0answers
22 views

“sudo do-release-upgrade” or “do-release-upgrade”? [duplicate]

I see to upgrade Ubuntu to a new release version that I have to do do-release-upgrade which checks for the new version and allows me to upgrade. But would it not be better to do sudo ...
0
votes
1answer
10k views

“No input files” running C program [closed]

When i tried to run hello program of C on the terminal the following error comes: $ gcc hello.c -o hello gcc: error: hello.c: No such file or directory gcc: fatal error: no input files compilation ...
0
votes
1answer
415 views

Unable to update system from terminal on Ubuntu 14.04

I am using Ubuntu 14.04. Recently my institute changed network proxy settings. After that, I am unable to update anything from my terminal. Also, new installations from terminal are not possible. I ...
0
votes
1answer
396 views

Command line python is different from Python IDLE

I have installed sklearn on Ubuntu 14.04. However, when I execute a script via the command line which imports sklearn, I get an import error. Running the same script with Python IDLE yields no error ...
0
votes
1answer
398 views

Why does terminal keep closing right after I open it?

I tried to edit the profile so that when I start my gnome-terminal it always starts with archey... So after adding archey to something, I closed my terminal and tried to re-open it... However it ...
2
votes
3answers
514 views

Execute command in terminal an don't wait its return

I need to run Firefox browser from terminal. Browser works fine, but terminal still waits for Firefox to return and if I do CTRL+C, it terminates Firefox. How to run command to make Firefox work ...
2
votes
1answer
38 views

Changed permissions of su

I accidentally changed permissions of /usr/bin/su by chmod 744 su, and am not able to become root any more. How can I change the permissions back?
1
vote
2answers
307 views

How can I delete all folders of a specific name without deleting Contents in it?

How do I delete all Folders with a specific name (e.g. 128Kbps_Songs) without deleting its files For example if I have directory "MP3_SONGS" with subdirectories "A", "B", "C" and each subdirectory ...
0
votes
1answer
146 views

How to perform apt-get operation on all installed packages?

I need to perform a dpkg-repack operation on everything to move to a new install on another hard disk, but the problem with this installation is that both I can't access any gui from a couple ...
43
votes
2answers
21k views

apt-get stuck at 0 [Connecting to us.archive.ubuntu.com]

When I do upgrade it gets stuck here: user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done ...
1
vote
2answers
1k views

why does mailx — -f work no longer

I did the following in Ubuntu 12.04: echo "some body" | mailx -s "some subject" recipient@example.de -- -f sender@example.de it generated a message like this: To: recipient@example.de Subject: ...
0
votes
1answer
117 views

Reset terminal after each command in ZSH

I am using Konsole + ZSH in KDE with several tabs open. In some tabs I run different programs -- Python scripts with ipdb and other. At some point I cannot enter new line anymore -- pressing Enter ...
1
vote
1answer
138 views

How do I fill certain percentage by height of an image using ImageMagick commands in ubuntu?

I have an image with around 20% of its bottom filled with white color. But the image has some dots of other colors than white. I have 100s of such images which I would like to remove those dots from. ...
0
votes
1answer
381 views

Problem while creating the 95proxies file

When I run this command in Terminal: sudo gedit /etc/apt/apt.conf.d The following message is displayed: /etc/apt/apt.conf.d is directory please check that you typed the location correctly and try ...
1
vote
1answer
53 views

Upgrading packages through Terminal and knowing when a restart is then needed [duplicate]

When I run the application Software Updater and I install some updates which need a restart of my computer, it tells me that I need to restart. But when running this command in Terminal: sudo ...
14
votes
7answers
4k views

Convert thousands of .pngs to animated .gif, `convert` uses too much memory

Many of the questions asking how to create an animated gif from a set of png images suggest to use a variant of ImageMagick's convert command: convert -delay 2 -loop 0 *.png animated.gif However, I ...
1
vote
2answers
36 views

How to find the first thousand bytes of an image file using ddtools

Hi I am looking to find the first thousand bytes of an image file using ddtools in terminal. Ubuntu Can anyone help please. Many thanks in advance.
0
votes
2answers
601 views

Find out my user's group name without a terminal

I have managed to break my X server, and am trying to attempt the solution offered in this page. I only have one user on the system, but I have no idea what its group name is, which means I can't ...
2
votes
2answers
391 views

How to use 'if' inside '-exec' attribute of 'find'?

I have a directory with many pairs of files. Each non-text file has a textual description partner. For example a directory can look like this: a.jpg a.jpg.text b.ogv b.ogv.text cd ef.JpG cd ...
1
vote
3answers
139 views

gksudo doesn't act like sudo for 'string' >> file [duplicate]

I'm trying to do a two-lines-script to temporary set a specific nameserver. Therefore I just output 'nameserver XXX.XXX.XXX.XXX' to the /etc/resolv.conf file, because it gets overwritten next time ...
0
votes
3answers
1k views

How do I open file or directory in terminal without typing the full directory path?

I am currently accessing the following directory user:/var/www/html$ Whenever I want to access a file or directory for example var/www/html/nauv/application/bootstrap.php or ...
0
votes
1answer
352 views

how to kill any process

My process show using this command : abc@ABC:~$ ps -e | grep -e apt -e adept | grep -v grep 2838 ? 00:00:11 aptd This 2838 Process kill using this command sudo kill -9 2838 But also its ...
0
votes
1answer
523 views

Problem setting up Environment for 'make' command execution

I am trying to set up devkitPro for ARM use, but I continuously get an error while executing the last two commands. The commands are make and make install. The tutorials I am following: ...
3
votes
1answer
355 views

put multiple matches on one line to a new line using grep

I need to put multiple matches on a line each on a new line example: grep "banana" This is the output Apple banana orange banana lemon melon banana grapes apple banana I want to become: ...
4
votes
2answers
834 views

Why isn't this script to delete part of my command history working on my computer?

The script can be found here: http://stackoverflow.com/questions/14750650/how-to-delete-history-of-last-10-commands-in-shell For convenience here it is: for x in `seq $1 $2` do history -d $1 done ...
4
votes
6answers
6k views

How to fully remove VLC Player?

I installed VLC player, but now I want to be fully rid of it, so I typed in the following command in Terminal: sudo apt-get purge vlc And it told me that it had purged it, but then in Terminal when ...
1
vote
1answer
188 views

Unlocking applications from launcher from the command line

In order to automatically configure fresh installations, I need a way to unlock the default applications from the launcher bar. Don't know where this information is stored, may be editing/substituting ...
1
vote
1answer
511 views

daily-19909.cdiff not found on remote server

I have got ClamAV installed. And recently when I have been executing the following command in Terminal: sudo freshclam I have been getting errors such as this one which I got today: ClamAV update ...
-4
votes
3answers
1k views

find all headers file begin with vowels in /usr/include

I need to find all headers from /usr/include that begin with vowels (a,e,i,o,u) Example: acpi.h aclinux.h ah.h ... I don't know how to do it , I tried something with grep but I didn't make it ...
9
votes
4answers
1k views

How does `>` and `>>` work?

I tried to rev a file and then pipe it to cat > same_file but it was turning into a blank file. While I tried rev file.txt | cat > file2.txt && mv file.txt file2.txt; it worked. ...
1
vote
1answer
82 views

What am I doing wrong with Sed

My input: sed -i 's/if ($.browser.msie)/if ($.browser={ msie: ( navigator.appName == 'Microsoft Internet Explorer') ? true : false })/g' file.js I have tried putting the search and the replace ...
3
votes
4answers
759 views

Is it possible to create commands, put it in one file and run without “./”? [duplicate]

If I create a script in a file like this: #!/bin/bash echo "test" As far I know (as a newbie) is to put it in some folder then make it executable with chmod +x myscript and then execute it with ...
0
votes
1answer
49 views

Is there an environment variable in csh to modify PS2?

Is there an environment variable in CSH to change the PS2 like in bash and sh? For example: $PS2 = "hi" I tried it but it doesn't work in csh.
0
votes
1answer
908 views

Is it possible to use variable in sed command in unix bash script [duplicate]

I trying to solve following problem. With great helps of others here, I can write and understand simple do loop in bash scripting. Now I try to do this: In "mein_directory" directory I need ...
14
votes
3answers
1k views

How to create 100 subdirectories using a Bash script?

I am trying to create 100 different subdirectories in certain directories using a Bash script. I start with a basic for loop (that is, for f in $FILES;do mkdir f done), but it doesn't work. To be ...