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

learn more… | top users | synonyms (6)

1
vote
4answers
111 views

How to move directories that were listed in a .txt file?

I'm using a program to tag music that generates a .txt list of the skipped (untagged) folders that processes. I just want to be able to take this list (that have the complete path for each folder) ...
-1
votes
0answers
16 views

Number of people who visit my website [on hold]

Can I find it with connecting to my website from puty?Or is there some other way?I downloaded some from command-line but I could not find how to execute them
1
vote
0answers
35 views

Non-printing characters showing up in terminal prompt

Without color my prompt looks like this: [0] [dimo414@dimo414:/tmp] $ echo $PS1 | sed 's/\x1b/\\e/g' \n[0] [dimo414@dimo414:/tmp]\n\$ I add some color and \[...\] delimit it: [0] ...
2
votes
4answers
389 views

Is there a log of all activity I could open in terminal?

I'd like to have a terminal opened and study the processes and everything happening in a regular use of Ubuntu. What commands and files can I use to see the logs in real-time? Thanks.
2
votes
1answer
17 views

tty1 on monitor A; tty2 on monitor B

This is an odd question, and I don't think I would even have a use for it, but: Can I bring up tty1 on one monitor, and tty2 on the other at the same time?
0
votes
0answers
8 views

Running Ubuntu Touch applications in command line for gdb debugging?

I have already seen some answers related to this, but they didn't bring me to a definitive answer, so I'm going to try again. Basically, my question is: how can I run Ubuntu Touch applications from ...
1
vote
2answers
26 views

Unable to open Eclipse from Dash Home

I can't open Eclipse from Dash Home although it shows its icon. Eclipse was properly installed using apt-get. When I launch Eclipse from Dash Home it doesn't open. It opens only through Terminal. How ...
0
votes
1answer
16 views

Run php File in Browser from Command Line

I have apache2 working and can run php files by navigating to localhost using chrome browser. However I'd like to be able to launch the files within the browser from the command line. google-chrome ...
2
votes
1answer
35 views

Shell script password with special chars

I've build a shell mysql backup script which works very well. It only has problems with passwords with special chars like this: xgT{uic[Is?uJ+. Here is the important part of the script: #!/bin/sh ...
0
votes
1answer
16 views

Ubuntu can not access other ubuntu hdd which is external

I had 14.04 ubuntu and my laptop crashed. I need to save data from there. So i created a ubuntu 14.04 live usb and put in into my desktop and boot from it. I can see my hdd now (i connected via usb ...
0
votes
0answers
16 views

How to delete several files from a directory using a .txt file where the filenames to delete are listed up? [duplicate]

I have a directory containing several files (approximately 1000 files). I want to remove several of these files using the commandline. The file names from the files I want to delete are listed under ...
-2
votes
1answer
28 views

1.gcc compiler…make it work for c, do I miss something?… as error, can't find file 2. bin directory under home directory etc

OK, complete beginner question, I know: I installed Ubuntu to learn C coding So, I am linux and coding amateur, second day for both, to be precise. I did code with the editor the first source ...
1
vote
1answer
183 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 ...
0
votes
0answers
15 views

How to release an IP address and renew from the commandline?

I am using modern versions of Ubuntu that use network-manager, and I would like release and renew my network settings through the commandline. In the olden days when Ubuntu used the interfaces file, ...
0
votes
4answers
396 views

An Ubuntu command bricked my sytem?

I freshly installed Ubuntu on my computer a few days ago to run an exclusive program. I finished with it, and I was about to format the drive to reinstall Windows. However, my little brother wanted to ...
8
votes
2answers
7k views

Only view the CPU temperature from command `sensors`

Ok, so when I run the command: sensors I get a truck load of info: atk0110-acpi-0 Adapter: ACPI interface Vcore Voltage: +1.16 V (min = +0.85 V, max = +1.60 V) +3.3 Voltage: +3.39 V ...
25
votes
2answers
8k views

How does this [t]ricky bracket expression in grep work?

I saw this one-liner recently: $ ps -ef | grep [f]irefox thorsen 16730 1 1 Jun19 ? 00:27:27 /usr/lib/firefox/firefox ... So it seems to return the list of processes with "firefox" ...
0
votes
2answers
2k views

What are all of the command line options for Google Chrome?

I use Google Chrome as my main browser, and I wanted to know what things I can do with it from command line - especially commands that you can't do with the GUI.
2
votes
1answer
390 views

How to make a playlist from a directory of mp3 files?

How do you make a universal playlist from a directory of mp3 files? This question came up as my wife is a musician (violinist) and she has a gig, and the DJ at the event will be playing her ...
3
votes
2answers
299 views

How do I simply run an ubuntu touch app from the terminal?

I've got a qml file and I just want to ssh to the phone and do qmlscene myfile.qml Is it possible without doing all that stuff with SDK and packages? Just vim and some simple commands that can fit ...
1
vote
1answer
24 views

Add a delay to a keyboard shortcut

To put my screens on standby, I've defined a keyboard shortcut: xset dpms force standby This causes the screens to go into standby mode immediately. However, I'd like the computer to wait for 2 ...
2
votes
2answers
18 views

mv a folder and now the folder seems gone

I typed the following: mv /var/www/folder/ ../../ Now I can't find that folder or anything that was inside of it. What am I missing? /var looks like this: root@,my-server:/var# ls -la total 52 ...
0
votes
1answer
24 views

How to get different colors in different terminals like BlackArch Linux

BlackArch Linux has 4 different color terminals (terminal green, terminal red, terminal yellow and terminal white). Is there any way for me to set up something similar in Ubuntu?
1
vote
1answer
23 views

How to check computer's timezone through Terminal? [duplicate]

I am writing a bash script which at some point needs to determine a user's timezone, so how exactly can I check the timezone in Terminal? I would like to be able to get output in terms of GMT and UTC. ...
9
votes
5answers
1k views

.sh specifying extension?

Why is it some systems will run a .sh file just by specifying the file name without extension and others require name plus extension? In my case I'm trying to write a series of commands following ...
2
votes
3answers
271 views

Cyclic script execution

How to make the cyclic execution of the script? At the end of the script i need to run it again. Cron is not suitable, because i need to run the script immediately after the previous
0
votes
1answer
29 views

-gt: unary operator expected shell script

Getting this error after the upgrade packages in ubuntu. #!/bin/bash used=$(df -H | grep 'rootfs' | cut -d "G" -f 4 | cut -d "%" -f 1) limit=90 if [ $used -gt $limit ]; then Or [ "$used" -gt ...
3
votes
3answers
40 views

No access to the terminal, how can I find it or install it?

So I was uninstalling some programs of mine that I have no use of anymore such as video editors, Skype and Opera. After I completed that, I close my terminal. I realized I needed to install a new ...
0
votes
0answers
27 views

Terminal won't start [duplicate]

Whenever I click Terminal icon it won't open and also I tried xterm and run gnome-terminal. Here is a screenshot of error:
0
votes
2answers
9k views

how to concatenate two strings in shell script in 3.13.0-34-generic kernel

I want to concatenate two strings for the shell file im getting error when i have created the shell file in following manner could you please suggest how to get it set export ...
0
votes
3answers
1k views

Terminal commands [closed]

I have some questions about some Terminal commands: Why must you do sudo apt-get update before installing an program or after downloading something? Does it update Ubuntu then? What is the ...
21
votes
1answer
25k views

Why is /etc/profile not invoked for non-login shells?

Login and non-login shell defined as: su - $USER # will give you a login shell bash # will give you a non-login shell /etc/profile is not invoked for non-login shells, such as when you start ...
1
vote
1answer
25 views

missing package CommandNotFound

I recently updated from 15.10 to 16.04 and now my python3 seems to be messed up. Before the upgrade I had python3.4 and python3.5.1(manually) installed. The upgrade removed python3.4 and replaced it ...
0
votes
1answer
42 views

permission denied

I set the Java command to an alias in my /home/.bashrc. alias java='/home/documents/jdk1.7/bin/java'. However, typing java results in: bash: /home/documents/jdk1.7/bin/java: permission denied
1
vote
0answers
25 views

Hot Corners Musical Sequence Command Script

I am writing a script which uses hot corners to play specific musical notes when hovering in corners, and depending on the musical sequence to execute a specific command. The script is called with ...
0
votes
1answer
21 views

which system command should i use to get the desired output given below

I need to write a system program that imitates who and w.Print the time since login(in the form HH:MM:SS)and the host name. Allow for a command line option -p that also prints the interesting ...
3
votes
2answers
307 views

Command line IF not working as expected

I'm relatively new to the terminal programming. I'm trying to run an IF condition within a FOR loop. (The command is to be run by a cronjob) for i in {1..5}; do echo $i; if [ $i>3 ]; then echo $i; ...
6
votes
2answers
15k views

What is the command to display the last TEN lines in file: /var/log/syslog

I want to know what is the command to display the last TEN lines in file: /var/log/syslog
3
votes
3answers
16k views

How to install Opera Browser?

I am trying to install opera browser from the terminal. I downloaded the 'debian' installer because it didn't show up in software center. It completely destroyed my software center - it is frozen ...
1
vote
0answers
10 views

Extract page range from pdf [duplicate]

I want to extract the total page range of a pdf using using bash commands. Is it possible to do.
2
votes
2answers
2k views

Merge multiple mp4 files into a single video via the terminal [duplicate]

I am trying to concatenate a directory full of .mp4 files into a single video through the terminal. I have found plenty of methods that say they can do this but either require FFmpeg (which, to the ...
1
vote
0answers
43 views

Does the Ubuntu installer actually makes an LVM partition during installation?

I installed Ubuntu in LVM partitioning but and I'm trying to follow this wiki and Whe I try to do pvcreate it gives me this : sudo pvcreate /dev/sda1 /run/lvm/lvmetad.socket: connect failed: No ...
1
vote
0answers
18 views

Username & Host Name are Screwed on Terminal

I have been working on my machine to setup a web server. At a certain point, I noticed my username & host name displayed at the very beginning of each line of terminal commands are different from ...
2
votes
1answer
16 views

Find a file beginning with a string but having a specific extension

It doesn't work if I do this: string*.extension How do I do this? I want to rename a file that has a specific beginning, but is completely random after that, but has a specific extension.
0
votes
2answers
163 views

Sublime Text 3 dpkg error [duplicate]

I want to install Sublime Text 3 , but had a problem, my terminal is showing this error: dpkg: error: dpkg status database is locked by another process What shall I do?
7
votes
1answer
115k views

Terminal: sudo: apt-get: command not found

Lately some really bad things have been happening with my computer, having to do with lack of icons and all kinds of bad things going with my graphical interface. All the bad things in the appeal are ...
0
votes
2answers
36 views

Cannot tell ubuntu use python3.4 instead of 2.7

I tried this how to tell ubuntu to use python 3.4 instead of 2.7? but nothing.. I have a problem with the nonlocal This is my code: x = 50 def func_outer(): x=2 print('x is '), x ...
2
votes
1answer
45 views

Auto chmod and launch?

Is there a way to have all files chmoded and then launched automatically? Say when I have my pc off, I insert a usb stick with a game on it, a lot of random files need to be chmoded and then I would ...
0
votes
1answer
25 views

How to connect via ssh and use gcc on target?

I would like to do two things automatically within a bash script: Connect via ssh to my target. Execute gcc. My script looks like this: ( echo "cd myfolder" echo "gcc -o mybin ...
1
vote
1answer
27 views

What is POSIX-compatible mode in Linux?

The book says : When in POSIX-compatible mode, bash will emulate sh. What does this mean? What is meant by emulation in simple layman terms?