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

learn more… | top users | synonyms (6)

0
votes
1answer
23 views

mariadb-server syntax error

I am writing a bash script and having trouble with $PASSWORD. Can anyone please tell me the correct way to write sql lines in bash script? QUERY="GRANT ALL PRIVILEGES ON db.* TO 'user'@'localhost' ...
4
votes
1answer
39 views

“file /var/log/syslog is being edited” message in nano

To the best of my knowledge, I can view /var/log/syslog with the command sudo nano /var/log/syslog and successfully did so several times during a session; however, I was trying to search the log ...
0
votes
1answer
25 views

Prevent other users in same group to change my own file?

I have a share directory with another user, say Bill. The directory has permission as 775. I create my own file with the same permission in the directory. My file has owner and group as my user ...
0
votes
2answers
1k views

Playing videos from terminal

I am trying to play videos from terminal using this command vlc my_video.avi The error that I am giving when i try to run this command-- VLC media player 2.1.4 Rincewind (revision ...
1
vote
2answers
89 views

How to run a script from terminal [duplicate]

Hi I would like to run a script from the terminal, is there anyway to do that? For example : if I have a python script I would normally run it with this command : python script.py How can I run ...
3
votes
0answers
39 views

How to quickly get the reason for the most recent update of a package from the command-line?

Is there a command-line command I can run to quickly determine the reason for a package update? Ideally, a command that dumps a set of URLs to all of the relevant information. For example (it's a ...
7
votes
5answers
424 views

Bash - Check directory for files against list of partial file names

I have a server which receives a file per client each day into a directory. The filenames are constructed as follows: uuid_datestring_other-data For example: ...
0
votes
1answer
42 views

Ubuntu 15: after installing and configuring java, echo $JAVA_Home is working, Java -version is not working [duplicate]

I have installed the oracle Java 8 and configure it. cmd-> echo $JAVA_HOME /usr/lib/jvm/oracle_jdk8 cmd-> echo $PATH ...
0
votes
0answers
24 views

Terminal Closing unexpectedly

I'm trying to install openjdk-7 in my ubuntu. but after running that command the terminal closed directly. This is happening every time when i run commands. Terminal close directly without any warning ...
0
votes
1answer
22 views

Interpreting !12 as string and not as terminal history

Using the sample command below in curl, it doesn't work as expected: curl -ik "http://localhost/index.php?username=parto&password=hello!23" I expect the parameters to be passed to include: ...
1
vote
1answer
2k views

Ubuntu default terminal in Lubuntu

Recently I had to re-install my linux OS, and now I ran into some annoying problems. I had Ubuntu, and then I installed the Lubuntu desktop enviroment. I do not like LXTerminal but I was able to use ...
0
votes
2answers
125 views

Snappy timezone

I read the snappy config command, but I still can't change timezone. The example doesn't looks like a terminal command! Can you help me to set my snappy timezone? Thank you
329
votes
9answers
304k views

How do I determine the total size of a directory (folder) from the command line?

Is there a simple command to display the total aggregate size (disk usage) of all files in a directory (folder)? I have tried these, and they don't do what I want: ls -l, which only displays the ...
-4
votes
1answer
29 views

**…** what are these dots meaning? [closed]

>>> num=int(input("enter the number:")) enter the number:24 >>> if(number%2==0): **...** print("the number is even") File "<stdin>", line 2 print("the number is even") ...
0
votes
0answers
10 views

libperl5.20 rxvt-unicode-256color Ubuntu 14

I want to install new version of rxvt-unicode-256color (with clipboard suppport), but on my system have perl 5.18 which is not compatible with new version of rxvt. I'm tried to use perlbrew. But ...
0
votes
0answers
39 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 ...
0
votes
2answers
4k views

How to fix dangling symlink error

I am trying to install transmission on my ubuntu 14.04 server and I am unsure whether to skip this part or not. I am trying to give permissions to a folder with sudo chmod -R 770 ...
5
votes
1answer
52 views

A sleep script for Ubuntu server

Let's start from the beginning: I have a Pi which wakes up my server when a request comes in on tcpdump, and it works like a treat! My problem is that I want my server to sleep when there is no ...
3
votes
2answers
45 views

Replace first column on a file

I have the following file. 101; John Bauer; 811-7780831; 102; Anthony Higgins; 844-4317627; 102; Anthony Higgins; 844-4317627; 103; Arnold Sipes; 866-4343123; 104; Donald Quinn; ...
12
votes
2answers
17k views

Command to split a text file according to number of lines

The situation: I have a text file which is about 1.5GB containing about 4000000 lines. I want to import this to Libreoffice calc and as u know you can't import this huge file with large number of ...
1
vote
1answer
30 views

Does the 'at' command require a full path to the script's name?

I'm running Ubuntu 14.04 LTS. Sometimes I use the at command to run a Bash script one time like this: at -f goscript 8:00pm (Execs need me to run a report at a time not in crontab.) Is that the ...
-1
votes
1answer
27 views

Print a String on Its Own Place in Unix Shell [on hold]

I'm trying to print contents of a text file(actually its strings). I'm familiar with some commands like grep, awk, sed; I forcibly want to echo string on its original place in file and I couldn't. You ...
7
votes
4answers
61k views

Ping for 4 times

Usually I use ping to check my internet connection. In windows, if I use: ping google.com I get only 4 information ping, but on Ubuntu, if I use that command, the ping can' stop until I stop it ...
12
votes
3answers
1k views

Focus existing terminal with `Ctrl-Alt-T` shortcut

I tend to use the terminal a lot, So I wondering if there is a way I can make Ctrl+Alt+T focus the existing terminal if there is one, otherwise create a new terminal?
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 ...
-1
votes
1answer
40 views

I found in a test “navigate to the bin directory, make a file of entries i find there and store it in your personal directory” [closed]

How do i get to bin because every time i try in terminal it says there no such file or directory as bin, ive tried cd bin, cd ..bin cd ../bin. I want to point out i have no idea what im doing and ...
1
vote
1answer
33 views

How to send KDE5 desktop notification from a bash script?

I've tried a number of options, none of them worked: notify-send 'text' kdialog --passivepopup 'text' 5 qdbus org.kde.knotify /Notify event "event" 'app' "(" ")" 'title' 'text' 'pixmap' '' 5 0
41
votes
8answers
294k views

Where is .bashrc?

I feel stupid asking, but I can't seem to find the answer to this anywhere. I'm trying to follow these instructions to edit my bash prompt, but there is no .bashrc in either my user directory ...
1
vote
2answers
65 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 ...
0
votes
0answers
13 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 ...
4
votes
3answers
489 views

Can't get workrave window to display under Ubuntu Gnome

I'm using Ubuntu Gnome 14.04 which is using gnome shell 3.10.4. I installed workrave through the terminal and the first time it launched the small window with the countdown timer displayed and it ...
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 ...
-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
1answer
38 views

No GUI after ubuntu 15.04 upgrade

I tried updating to 15.04. I can't get to the GUI. At boot I get a txt message "starting version 2.19 and then a terminal log in comes up. My login works but none of the terminal solutions I have ...
4
votes
6answers
9k views

How do I turn off the screen saver using the command line?

I would like to turn off the screen saver from command line, which used to work with gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type=bool false in natty & oneiric for ...
2
votes
2answers
6k views

ffmpeg & ffprobe & libfdk-aac on Ubuntu 14.10 server

How to install properly ffmpeg? (not a duplicate as most of the similar answers don't work properly) Normally i compile ffmpeg manually with the following guide ...
68
votes
7answers
83k views

How to get the MD5 hash of a string directly in the terminal?

How do I get the MD5 hash of a string directly from the terminal? For example, I want the string abcdefg hashed. Currently the md5sum command only accepts a filename as input. I want to simply enter ...
-1
votes
1answer
31 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 ...
36
votes
8answers
14k views

Some fast way to save and restore tabs of Terminal?

I have a Terminal window with a dozen named tabs open. I would like to save the current configuration and have it restored with names and directories. Is there a way to do this?
0
votes
2answers
52 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?
5
votes
2answers
545 views

How To Disable Sticky Edges via Command Line?

I know how to disable Sticky Edges via the Settings->Display UI, however, I want to be able to do it via command line or config file. Does anyone know how to disable "sticky edges" via a command or ...
1
vote
2answers
988 views

Importing a Python module works from command line, but not from PyCharm

My default Python binary is set to the one with the Anaconda distribution of Python. This is found at /home/karnivaurus/anaconda/bin/python, and I have made this the default by adding to my .bashrc ...
0
votes
1answer
20 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 ...
2
votes
1answer
96 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?
3
votes
0answers
23 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 ...
17
votes
3answers
6k views

Why there is no nsenter in util-linux?

I frequently using nsenter command for my purposes in my main system under Arch Linux. Now I have to work on Ubuntu to test my apps on it, but there isn't nsenter in util-linux. Maybe it's a separate ...
4
votes
4answers
2k views

Why won't Ubuntu Terminal accept “\” character?

I can't get my terminal shell to accept a \ when I type it in. Nothing happens. I've Googled but haven't seen anything which seems to address this. I have no idea where I would start to trouble ...