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

learn more… | top users | synonyms (6)

1
vote
1answer
53 views

How to avoid password request for sudo for crontab scripts?

I need that a new user could execute sudo without any request of password, because this user has in crontab a .sh that uses sudo for some commands. I created a new user on my ubuntu server 16.04 x64 ...
3
votes
1answer
123 views

How to force command line VLC to stream youtube videos of specific quality?

I want to stream youtube videos from command line using VLC media player. I was able to stream youtube videos using this command cvlc https://www.youtube.com/watch?v=m2Oo4kBHBNU The problem is that ...
2
votes
1answer
55 views

Unable to run a script from a text file

I have a simple script that I want to be able to run by double clicking a text file and having it run in terminal so i don't have to do it manually #!bin/bash $ cd /home/tyler/df_linux $ ./df I've ...
0
votes
1answer
31 views

Java file won't run

So I've installed Java 8 via PPA using this method: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ And it seems to be working: jamie@jamie-ncase:/media/fa7e62a0-92d8-4af6-86d9-...
1
vote
2answers
70 views

Unable to using Terminix [closed]

I can no longer use Terminix. I remember that last thing I did in Terminix it was setting own command (echo) with option immediately closing terminal. Since then, Terminix always starts and ends at ...
5
votes
1answer
69 views

How to extract first 10pages from each pdf files of a folder

I have 90 sub-folders in a folder. Each sub-folder contains pdf files. Total pdf files are nearly 2200. How can I extract page number 3 to 10 from all pdfs? To extract the pages from one pdf, I am ...
2
votes
1answer
24 views

How can I view the output of a .sh file placed in rc.local?

I wrote a short script to run lampp's php script. It is residing on rc.local where I first run opt/lampp/lampp and then, run the sh (which is infinite) that is echoing to the output buffer infinitely. ...
7
votes
2answers
46 views

How to effectively navigate the Terminal and installed packages/commands?

I am an electrical & computer engineer that has recently started using Ubuntu 16.04 to modify an Android-based Computer on Module (COM) to suit the needs of a new product I am working on for the ...
2
votes
0answers
19 views

Extracted a zip to install exe but directory is locked and not found with ls -la

Quite new to Lin. Downloaded Visual Studio Code to extract its binaries and install. Got to files but one is a locked directory that I want to delete and I can't even find with sudo ls -la to later do ...
15
votes
1answer
558 views

How to set the first picture of every folders as their folder icons?

If there are pictures in folder A, B, C.....Z, how do I automatically set the first pictures of these folders as their folder icons? Is there a way like a script or something else?
5
votes
2answers
39 views

Isolate specific info from terminal output

How can I shorten the data that I retrieve once I enter a command? For example if I input: ifconfig -a getifaddr I only want the IP address, nothing else. Surely there is something else that I can ...
2
votes
1answer
69 views

Controlling Ubuntu Gnome 16.04 screen lock with arduino

I am trying to use arduino with my laptop (Ubuntu-gnome 16.04 installed) to control the screen lock using RFID Module (Screen lock/unlock is controlled by an RFID card) Here in this particular case, ...
3
votes
0answers
89 views

packages installed via Software Center do not show up in menu without reboot

After installing Opera using the Software Center, its icon does not show up in the start menu. But after I reboot, it does show up in the start menu. It's really annoying that I have to keep ...
0
votes
1answer
23 views

Issue with dir is other-writeable but not sticky (blue text, green background on all directories)

Some background: Distro: Ubuntu 16.04 LTS Experience level: Not new to Linux, but not an expert. The issue: When working with SMART Tools to check an external USB drive, somehow I managed ...
0
votes
1answer
17 views

Emscripten and em++ install question

I installed the latest emsdk_portable so I could use Emscripten, then I ran the following commands with no problem. $ ./emsdk update $ ./emsdk install latest Then, I went to run this command: ./...
1
vote
0answers
24 views

R statistics on Ubuntu 16.04 lts: copy and paste does not work

I installed Ubuntu 16.04 on 2 different machines. On both I have this problem: I open a terminal, call for R statistics, copy my code from any file (txt, doc, xls, csv, it's all the same), paste it on ...
4
votes
1answer
215 views

Run in terminal not working

I am new to Ubuntu and I was trying to run this script: #!/usr/bin/env bash echo hello world It works fine if I open the terminal first and manually invoke it. Like ./test. I have set "Ask each ...
2
votes
1answer
31 views

How do I create a program similar to 'fortune', that can be installed using apt-get install

I am trying to create a program, let's call it abcd like http://linux.die.net/man/6/fortune that can simply be installed like $ sudo apt-get install abcd. Now for the specifics, my program simply is ...
5
votes
1answer
51 views

Why is the output of wall command not displaying in stdout?

I am using ubuntu 14.04. I'm executing the wall command like this: $ wall Hi this is for testing ^d But it doesn't display the message in terminal. I'm just executing the wall command in my machine;...
0
votes
1answer
45 views

How to change access rights for /?

I accidentally changed access rights on / for my Ubuntu 16.04 using sudo chmod 466 /. I was supposed to change access rights for a file but instead I accidentally executed a chmod on / (root directory)...
0
votes
0answers
15 views

How to start byobu everytime I start a terminal when using zsh as default shell?

I'm using zsh as my default shell. I installed byobu and it seems to work fine, however I have to launch it manually every time I start a terminal instance (Ctrl+Alt+T). I checked byobu-config and ...
0
votes
1answer
38 views

.sh to loop through folders recursive-

My file path is /server/2TB_HDD/TV Shows/ (inside this I have about 100 shows, each with seasons in them) The problem I seem to be having is the file path. "TV Shows" part. Similar problem if I run ...
1
vote
1answer
98 views

Bash : Syntax error near unexpected token '('

i am a beginner to Linux stuffs. Following some tutorial I used the following command, that split my zinc.mol2 into 1000 files named tmp. cat zinc.mol2 | csplit -ftmp -n4 -ks - '%^@.TRIPOS.MOLECULE%' ...
12
votes
3answers
1k views

Why does redirecting sed output to same input file make my machine unresponsive?

I was trying sed to replace some keywords in a large file (100 MB). I was unaware of the -i (inplace) option, so my first attempt was to redirect like this: sed 's/original/edited/g' file.log >&...
2
votes
5answers
74 views

Shell Script source file not saved

I saved a shell script in bin(created by me). When I run the program, to avoid ./ to run the script I need to copy the script to one of the directories specified by PATH variable. The bin directory ...
26
votes
7answers
4k views

Why doesn't the command “ls | file” work?

I've been studying about the command line and learned that | (pipeline) is meant to redirect the output from a command to the input of another one. So why does the command ls | file doesn't work? ...
3
votes
4answers
63 views

formatting with awk

I have this text: Core/Dev Core/master FrontEnd/Dev FrontEnd/DoubleClick FrontEnd/HEAD -> FrontEnd/master FrontEnd/master Infrastructure/Dev Infrastructure/master Software/Dev Software/Control ...
6
votes
4answers
598 views

How to copy a folder to multiple folders using command line? [duplicate]

I want to copy a specific folder from one point to another and I have more the 300 destination folder where I want to copy that specific folder. Can anybody assist me with a proper solution? shell ...
1
vote
1answer
22 views

Visudo - Change user without password doesn't work

I want a user to be able to change to another user without a password and any other root rights. I followed already a hint on http://apple.stackexchange.com/questions/82438/allow-sudo-to-another-user-...
1
vote
2answers
53 views

How to copy files from multiple directories, adding the parent folder's name to the filename?

I have been looking to all possible answers about "copying file from multiple directories to one single directory" but I cannot find my answer. I need something slightly more specific for my database ...
1
vote
0answers
17 views

apache2 -V getting error messages

AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} My apache is located under /usr/sbin/, when I run /usr/sbin/apache2 -V ...
0
votes
0answers
10 views

How do I extend a partition with rootvol through the command line?

Here is a picture of my current fdisk, parted, and lsblk data: Thanks for the help. I have no idea what to do.
1
vote
1answer
38 views

Activating Matlab from Command line and from Launcher [duplicate]

When I type Matlab (without sudo) on the command line for the shell, matlab properly opens. Then, on the left pane in Ubuntu 16.04, I tell Ubuntu to lock Matlab to launcher. However, when I try to ...
3
votes
1answer
28 views

How can I enable auto-completion for the snap command?

I am used to auto-completion for the command sudo apt-get install nam. Pressing tab will autocomplete the command to sudo apt-get install name. The same method, however, does not work by default for ...
1
vote
0answers
22 views

Autocomplete SSH bash: export: `-a': not a valid identifier

When I try to autocomplete using double TAB, I get this error: bash: export: `-a': not a valid identifier This mainly happens when trying to autocomplete ssh routes. However sometimes it fails to ...
3
votes
3answers
38 views

How to effectively use the man pages?

I am looking forward to mastering linux. I have been repeatedly told to refer to man pages when you are in doubt. Though I am very comfortable with the commandline, I find it very difficult to ...
7
votes
2answers
607 views

Open already running program via terminal

How do I switch to already running program using terminal? For examaple: firefox opens new firefox window. Is there a command that will focus the already opened firefox window?
9
votes
1answer
487 views

“STR: Command not found” while assigning a value to a variable

I entered the following lines into a shell script called “test.sh”: #!/bin/bash echo Hello World STR=”Hello Again” echo $STR After chmod to executable, I ran the script with ./test.sh. However, I ...
1
vote
1answer
32 views

Hot to get the message ID when sending email via command line?

I am trying to send a mail via simple mail command on the command line using this piece of code: $ echo "foo" | mail -s "Hello World" -t "someone@example.com" That’s working fine. My question is ...
1
vote
1answer
254 views

Why isn't Composer updated?

I'm using Ubuntu 16.04 LTS amd64. I have installed LAMP (php5.6, apache2, mysql) and Composer. I downloaded my laravel project from github. I would like to update Composer to start the local server ...
2
votes
2answers
47 views

How to extract certain strings from hyperlink and create a folder with same string in bash?

I have a text file(web.txt) containing a long list of urls with this pattern http://www.example.com/ab1.htm http://www.example.com/ab2.htm http://www.example.com/bc1.htm http://www.example.com/qw3....
2
votes
2answers
406 views

How can I switch between 12 hour and 24 hour format in command line?

I am in a learning phase. I could not find the command to change my time format from 12 hour to 24 hour. Can anyone please help me with this? Thank you!!
1
vote
0answers
27 views

Ubuntu starts up in terminal after updating to newer version

I have searched the internet for hours, and although I have found some similar problems and extracted some information from them, I still have the same problem. A few days ago I decided to update ...
1
vote
1answer
24 views

Recovery from Scalpel didn't show any recovered file

I have deleted some of my .odt files by mistake last night (near about 10 hours ago), and I had to recover those files as those were really important to me. I used scalepel for this purpose in which I ...
2
votes
1answer
253 views

mkdir says that file exists when it doesn't [duplicate]

When I run mkdir ~/.ipython/extensions/ I get mkdir: cannot create directory ‘/home/droudy/.ipython/extensions/’: File exists However when I navigate to /home/droudy, there is no .ipython ...
0
votes
1answer
17 views

Navigating/Exiting command line configuration screens from bash script

I'm new to bash scripting and making a initial setup script that I can run to quickly set up a new install. When installing ddclient sudo apt-get install ddclient -y it opens a command line ...
1
vote
1answer
41 views

Using source command to replace bash string with field array

I've programmed in other languages but bash and unix in general are very new to me. I think a bash wizard might see an obvious solution, using the source command to read in a settings file - and ...
3
votes
4answers
130 views

Concatenate strings stored in variables side by side

I have two variables which contain a set of strings. I need to concatenate the results of these variables to appear side by side. Variable a has: t t t Variable b has: xyz pqr stu I need to get ...
23
votes
2answers
1k views

What does “--” mean in terminal commands?

I have seen many tutorials that use a -- after commands. Something like this: command -- What does this -- mean?
1
vote
2answers
53 views

Command Prompt like Windows [duplicate]

Does Ubuntu have a command prompt like Windows and if so where do I find it to display the directory tree