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

learn more… | top users | synonyms (6)

0
votes
2answers
43 views

How do I change a variable of a background function?

I have been working on a script for my father that manages several tasks through a script with many functions that chain together (organization purposes). This script relies entirely on zenity for all ...
0
votes
0answers
11 views

Upstart Ruby version issue

I am trying to get Upstart to fire up Sidekiq (https://github.com/mperham/sidekiq/wiki/Deploying-to-Ubuntu). I can manually start it but the same command fails in the Upstart script. I have piped ...
0
votes
1answer
29 views

Bash script not running [duplicate]

So I'm pretty new to ubuntu and I'm trying to make a simple bash script that all it does is running Rubymine so I don't have to write it down in the command line everytime and also so I can have it on ...
0
votes
0answers
15 views

Configuring Postfix gives error E: The package lists or status file could not be parsed or opened [duplicate]

I'm trying to configure postfix mail server on Linux mint 17.2 When I try to execute following command aptitude install postfix libsasl2 ca-certificate libsasl2-modules This command gives me error ...
0
votes
0answers
28 views

Bash terminal : Revert change of 'interrrupt' (CTRL-C) shorcut key

I changed something on my system/terminal to change the shorcut key for interrupt the process in my bash terminal, I switched from CTRL+C to CTRL+J. However, stty -a gives: $ stty -a speed 38400 ...
-1
votes
1answer
27 views

gnome-terminal --disable-factory support problem

gnome-terminal --tab --title="700" --disable-factory -e Failed to parse arguments: Option "--disable-factory" is no longer supported in this version of gnome-terminal. i have gnome3 Any ...
0
votes
0answers
14 views

setpath in .sh script is not working [duplicate]

This is my .sh script. #!/bin/bash export PATH=$PATH:/home/srilm-1.7.1/bin When I am using this script file I could not add the environment variable path for temporary purpose(though the script is ...
0
votes
1answer
18 views

Disable 'record file and application usage' via command line

I am creating an install script. I would like to know how to disable the recent files appearing in the unity dash. I can disable them manually via settings -> security & privacy -> files ...
3
votes
0answers
21 views

Can't change gedit preferences and terminal preferences don't save

I'm new to Ubuntu and Linux in general. I've just started using it for one of my college courses and instead of having all of us install Linux on our machines they had us install a virtual machine ...
1
vote
1answer
28 views

I would like to batch re-size images in a terminal

I've got like 500 images to resize, I'm not going to do that in gimp...a terminal solution would suit me best. On ubuntu 14.04. I've read this question on stackoverflow (first posted the question ...
-1
votes
1answer
47 views

I can't use the ./ command in USB flash drive [duplicate]

I recently got Linux, and wanted to run the game dwarf fortress in my USB flash drive. To run dwarf fortress on Linux you have to use ./df in the dwarf fortress folder, but when I use this command it ...
0
votes
2answers
51 views

how to play video using terminal on ubuntu server

A few days before, I installed Ubuntu Server 14.04 on my android, but it has no gui so I can't play video. Is there is any way to play video using terminal?
0
votes
0answers
14 views

Shrink Terminal Prompt Path [duplicate]

This has crept up on me over the past many weeks to the point I am getting annoyed by this lengthy string as it gets in the way of reading the output messages. Here is what my Terminal looks like: ...
-1
votes
0answers
22 views

directory creation and ownership [on hold]

I have certain directories like backup/data/cm/au and backup/data/cm/Di .Ineed to create the directory path from cm/au and cm/Di in /Tmp.with the same ownership as that of the Orginal directories.I ...
0
votes
0answers
17 views

Bash script: How to concatenate input parameters with strings? [duplicate]

I want to define an alias bak_log which uses an input parameter to backup all files starting with such string I can't find the way to concatenate the input parameter with other strings in order to ...
2
votes
1answer
90 views

How can I determine if a process has a window, and subsequently show, hide or close it?

Is it possible, either through a shell script or terminal command, assuming you have the PID, determine if it has a main window (form), and then get info about it (title) and show/hide/close it?
0
votes
0answers
13 views

How to rsync files that match “*/folderName/*”

This is to help other suffering from rsync multiple subfolders that match the name small, since i have several folders named small #version1 not work everything is synced rsync --verbose --recursive ...
19
votes
4answers
3k views

Why does 'ls > ls.out' cause 'ls.out' to be included in list of names?

Why does $ ls > ls.out cause 'ls.out' to be included in list of names of files in current directory? Why was this chosen to be? Why not otherwise?
0
votes
3answers
51 views

How do i efficiently use environment variables?

I'm curious about learning about choosing correct env. variables. How to make out setting what env. variable would get the job done Example: if you want to make sure that command history always ...
0
votes
0answers
36 views

Bash script not working with shortcuts

My bash script is working flawless when i call from terminal. However, when i create shortcut to it acts weird. #!/bin/bash url="" function uploadImage { url="$(curl -s -F "file=@$1" ...
0
votes
0answers
13 views

PHP in command line failed : ERROR: memdup failed

After an upgrade to 14.04 LTS, I discovered I have some trouble with PHP. It is impossible to execute maintenance script by command line: [root@xubuntu log]# php ERROR: memdup failed I get ...
1
vote
2answers
32 views

find: missing argument to `-exec' [duplicate]

I am having problem with the find and grep commands. I want to find the files which are *.doc and match the pattern Danish from that file with grep command. I am using -exec to combine them but it ...
1
vote
2answers
58 views

parsing `/etc/passwd` file to find users with Interactive shells

I want to parse /etc/passwd file to find out if the user can run interactive shell. I know the 7th field in each line of /etc/passwd file tells the path of shell. But How do you say that, defined ...
14
votes
1answer
1k views

What does this “printf” command do?

I was going through a tutorial and there I came across a command: printf "%(%s)T" The output of this command is: 1454299615 Could anybody please tell me what is this command and what the output ...
0
votes
0answers
33 views

Changing the color of root prompt in terminal [duplicate]

If I'm going to edit the bashrc file, where do I place the color codes to change the color of the root prompt (and not the normal prompt)? I already have the color for normal prompt changed. But when ...
1
vote
0answers
20 views

script to open terminal with multiple tabs and different directories

I find myself opening the same set of terminals every time I startup. I have 3 tabs in a certain directory, all with python venv's activated, and then one extra tab for ssh'ing if I need to. It ...
1
vote
1answer
19 views

copy local file to remote server in ubuntu terminal

Jeez, where's Windows drag and drop when you need it. How can I achieve this simple task? In Ubuntu Terminal I have the prompt: metheuser@metheuser-HP-Pavilion-g6:~$ I make it: ...
0
votes
0answers
42 views

E: Some index files failed to download. They have been ignored, or old ones used instead

Here is my sources.list # deb cdrom:[Ubuntu 15.04 _Vivid Vervet_ - Release amd64 (20150422)]/ vivid main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer ...
0
votes
2answers
17 views

How to loop file names into an array or run custom code on it

This is a qna post (Do not need help, just wanted to help others). Recently worked with some files and had difficulty in reading the files #version1 (error on files with spaces) arrFiles[0]=0 ...
-1
votes
0answers
43 views

\[SOLVED] After running an upgrade i have no GUI - Wily [closed]

Resolved This might be a very case specific solution, i updated my DE (sddm) because it somehow wasn't upgraded: sudo apt-get install sddm -y I am aware i am asking a duplicate question, but ...
4
votes
1answer
101 views

Moving files with bash scripts

I have a bash script that watches a folder, if something is added to the folder, the script will move all contents withing the monitored folder to the defined destination. I have a few of these ...
0
votes
2answers
27 views

“which” command is not showing anything on standard output

When I run the which command it shows nothing. I ran all these, and none gave output. $ which /tool/ $ which RED*.pdf $ which anime $ which -a anime $ info which $ which -a $ which -a Downloads ...
0
votes
0answers
28 views

Manually connecting to WiFI network using iw results in disconnect

I want to manually connect to a Wifi network using either iw or iwconfig. I have tried both. My laptop is running Ubuntu 14.04 with network manager normally managing my wired and wireless networks. I ...
1
vote
0answers
31 views

Convert pdf to monochrome via inkscape command line

I have a 65-page PDF file that has text in a dark grey. (Actual text, not a picture/image of text.) Printing on my B/W printer, the text gets all blurry, because the printer is trying to make it less ...
0
votes
1answer
24 views

what do the columns in 'ls -l' mean? [duplicate]

I am looking specifically for the second column and how to change it. I know it has something to do with owners or groups but I cannot find a direct definition of what it means
4
votes
3answers
169 views

Size of device file ( missing in ls -l output )

When I try to print the device file output shows binary data in hexadecimal format. But upon doing a ls -l /dev/sda I get: brw-rw---- 1 root disk 8, 0 Jan 29 12:29 /dev/sda I don't ...
1
vote
0answers
20 views

Why do I get two RandR errors each time I run the xrandr commands?

I'm in the process of creating an xrandr GUI frontend, but I keep running into randr errors. When I run the xrandr --newmode command, I get a BadName error. Running the xrandr --addmode command after ...
7
votes
5answers
340 views

I need help with Grep to start at a section

I have some text files that I want to grep a section of code from. The goal I am trying to achieve is to start the view at a certain line & then be able to read anything below it. For example. In ...
0
votes
2answers
33 views

Add android-studio/bin/ to PATH environmental variable

Recently I installed Android Studio. Now I want to add android-studio/bin/ persistently to PATH environmental variable as Session-wide environment variables and not as System-wide environment ...
1
vote
1answer
27 views

How to redraw terminal window after wall command displays message

I have a script that will send wall notification to all open terminal sessions when battery gets bellow certain percentage,and will continue doing so every minute until power source is plugged in. ...
0
votes
0answers
14 views

How can I run a sudo command without entering a password? [duplicate]

I created a script that I wanted the system (Ubuntu 15.04) to run immediately after I log in, so I add the scripts to the "Startup Applications preference". However, the the script has some command ...
1
vote
1answer
19 views

Keyboard shortcut for ruby script

I have some problem here when I'm trying to make a keyboard shortcut for my ruby script. So the first step I've do for it was to make a alias and add that command for alias on file .bashrc alias ...
3
votes
1answer
27 views

problems with man pages

after trying to install man pages in italian language I get this error: man ls man: can't resolve /usr/share/man/man1/ls.1.gz: No such file or directory No manual entry for ls See 'man 7 ...
0
votes
0answers
26 views

make command ( gnuradio)

I'm using gnuradio , i'd tried to build a new block with c++ , after i finished my cpp file i wrote commands to build and install this block to work properly, mkdir build cd build cmake .. till ...
1
vote
2answers
44 views

Command on ubuntu

I'm using gnuradio , i'd tried to build a new block with c++ , after i finished my cpp file i wrote commands to build and install this block to work properly, mkdir build cd build cmake .. till ...
3
votes
1answer
34 views

Server, Remote Login, SSH?

Two Things. I'm trying to setup multiple server applications on Ubuntu With Terminal using SSH. I need to be able to use some form of login to the applications VNC, (having trouble with) SSH GREAT, ...
0
votes
0answers
13 views

Running VIsual Studio Code in Ubuntu gives strange error

I followed the steps to install Visual Studio Code from the answer here Download Visual Studio Code for Linux Extract it: unzip VSCode-linux-x64.zip -d ~/path/to/VSCode Run the Code executable to ...
-1
votes
2answers
57 views

Can't install anything with Terminal commands

Whenever I attempt to install anything through terminal commands it tells me, Sorry, user Matthew is not allowed to execute '/usr/bin/apt-get install .... I've already used the main account and ...
2
votes
1answer
27 views

Shell script needs to be run twice to work as expected

I have the following shell script: #!/bin/sh # 1. Kill the process along with the screen /usr/bin/pkill -f reportPrintingServer.jar # 2. Start the printing server again. /usr/bin/screen -S proRps ...
0
votes
1answer
32 views

tor command is not starting Tor Browser

I wanted to install Tor on my new Ubuntu (14.04) install. I followed all the instructions and tried to start tor. It starts correctly if I navigate to Tor's directory and run: ...