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

learn more… | top users | synonyms (6)

0
votes
1answer
14 views

FInd out duplicate lines

I have a file which contain following content. Hi abcd Hi abc hello hello xyz hello I want the find out duplicate lines as well as howmany times it is repeteing.My expected output is as below. 2 ...
1
vote
1answer
30 views

Find files excluding some directories

I am working with the following directory structure: onathan@Aristotle:~/EclipseWorkspaces/ShellUtilities/ShellUtilities$ ls -R .: calculateTargetDay CustomizeIso ec makeExecutable Models ...
0
votes
0answers
40 views

How to get terminal to run 24bit true color in ubuntu 16.04?

I'm wanting to run 24bit true color within the terminal. How may I do this? I've ran the command apt-cache show gnome-shell | grep Version and it throws out 3.18.4-0ubuntu3
1
vote
1answer
22 views

Ubuntu mv pwd command

I tried to move a file from one directory to another using this command in the terminal: mv ~/file.txt pwd In that moment i was in non-system hard drive. Later i wasn't able to find my file in that ...
1
vote
0answers
34 views

Scripting dconf changes

I've written a simple script for our Ubuntu machines at college which sets some dconf overrides to set the theme, background etc. However I cannot seem to get it to correctly set the login screen ...
0
votes
2answers
41 views

Connection Mysql fails

I need a little help installing/connecting an application to a mysql database. First time I faced many problems/errors, the most of them are gone and this is the result stull nothing haha... Does ...
0
votes
1answer
31 views

PDFTK, CODE128 and UTF-8

I'm used to fill PDF forms from PHP using PDFTK. Recently, I was asked to insert a code-128 barcode in a PDF. To do so, I created a PDF with several text fields for human-readable entries plus a ...
0
votes
0answers
25 views

Shutdown multiple minecraft servers with a script

I have multiple minecraft servers running on an ubuntu server. All of them are running in a screen belonging to their according user. I currently have a server running in a screen owned by user ...
0
votes
1answer
45 views

Ubuntu Server USB installation with installer's output on ttyS0 (serial port)

I need to install Ubuntu Server 16.04 on computer that has no CD/DVD input, nor VGA output. I want to perform installation using USB drive with the installer output sent by serial port (ttyS0). I've ...
1
vote
2answers
55 views

Is there a command to explicit the Ubuntu flavour?

I know that the lsb_release command echoes the Ubuntu version I'm currently using. But is there a command that prompts the system flavor (Ubuntu, Lubuntu, Kubuntu, Edubuntu, etc.) I'm in? Like: $ ...
0
votes
1answer
60 views

How can I get and change a value of a line inside of a file if the value of such line is unknown by me?

What I am trying to do is: There's a file, inside of it, there's a line (it surely will be there, 100%) in this model: name_of_the_value=xxx Where the value is numerical and unknown by me because ...
0
votes
1answer
28 views

Changing Edubuntu to Ubuntu Studio

I have installed Edubuntu 14.04 in my laptop. I wrongly installed this flavor without any idea about the various flours of Ubuntu versions. How can install or degrade it to Normal/Default Ubuntu ...
-1
votes
3answers
41 views

UNIX -grep 2nd character

So here's a sample line in my script: echo "Enter time(MILITARY FORMAT)(i.e 1245): " read time` so for example the user's input is 1315 how do i grep the 3rd and 4th digit (15) and then the output ...
-1
votes
0answers
21 views

lammps-daily command unable to run through terminal

After installing LAMMPS when i run command in terminal: $ lammps-daily LAMMPS (3 May 2016-ICMS) WARNING: OMP_NUM_THREADS environment is not set. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI ...
0
votes
1answer
33 views

How to change the name of Guake terminal?

My tab name of guake terminal is always "Terminal", whether I open a file or not. I hope that it can display "[num] filename".
0
votes
0answers
11 views

How do I fix malformed line 58 in source list (messed up the “fixing”)? [duplicate]

I'm very new to this, and very confused. I am getting an error that says this: Malformed line 58 in source list /etc/apt/sources.list (dist parse) The list of sources cannot be read. I then tried ...
6
votes
8answers
399 views

How to remove brackets () around ip address from traceroute output

I need to extract the 2nd IP address from a traceroute like so traceroute -m2 8.8.8.8 |grep .net |awk '{print $3}' (111.222.333.4444) No matter what I try I can't seem to work out how to remove the ...
1
vote
0answers
52 views

How to change “Global Dark Theme” on and off through Terminal?

I know how to set and display most themes, however I can find anything about how to turn the Global Dark Theme on and off through Terminal, I can only find the option in the gnome-tweak-tool. So is ...
0
votes
1answer
24 views

trouble creating directory backups of selected directories

I have to a create directory backups of selected directories; each backup should have only one root directory; if multiple directories are selected, then each of them should be stored in a separate ...
0
votes
0answers
24 views

Ubuntu showing Error 22 and refuse to boot

Couple of days ago, I installed Ubuntu alongside my Window 10 on my PC. Then my PC started complaining of low storage, then I tried to delete Ubuntu for Windows. I navigate to disk management via ...
2
votes
1answer
37 views

pyosd works with interpreter , but not with a script

I am working on a script that would display arbitrary system information on screen. For that purpose I've been trying to use pyosd module. Consider the following 3 lines: import pyosd p = ...
0
votes
1answer
27 views

Is there a way to set up some sort of flag or tag to a command instead of referring to its full name in terminal?

I'm trying to figure out if theres a way to rename or use some sort of tag that points to a package instead of having to write the whole name of the package in the command line? because some packages ...
0
votes
2answers
31 views

What package brings an application to the system [duplicate]

Some application may installed with a bunch of packages. For example, vim can go along with packages: vim-gnome, vim-gtk, vim-nox etc. To uninstall application I need to define what is the exaxt ...
-1
votes
1answer
78 views

How can I open multiple html files with gedit from a script?

I have a list of HTML files I use for writing. I would like to script to open them for editing. HTML files are associated with Firefox as the Default Application on my system. New to Linux and ...
0
votes
2answers
30 views

Script to enable “source” downloads in a deterministic manner

I wrote a couple of scripts to help users pull their current kernel source package, apply some patches of mine, and build it as a .deb package with make-kpkg. One of the few steps that requires manual ...
-1
votes
1answer
47 views

Help with “grep” command in terminal [closed]

I ran a command on a terminal in Ubuntu: $ grep "Director" file.lst And the output of that command was 1006|Pankaj | Director|sales|03/09/38|6700 I want know the full description of the output ...
2
votes
2answers
67 views

Why does sudo require a password the second time in a bash script every time? [duplicate]

I have a simple very tiny web app, and wanted to make my life a bit easier by having a very simplistic deployment script, that does the following: Pull updates from git Run composer Change owner of ...
0
votes
1answer
30 views

Script to send Email if Log grows past 90M

I have the Below Script to check the size of my Log file. Should it grow to beyond 84M to should be renamed with the current date and a a new one is automatically generated by my APP. However it ...
2
votes
1answer
46 views

Move part of file name to metadata

I have thousands upon thousands of songs that are named as; Artist - Song.mp3 Artist - Song.mp3 etc What I need to do is to move everything before the "-" and add it to the metadata of the file as ...
0
votes
2answers
63 views

How to run and where to save a downloaded package on Ubuntu?

There are two ways to download a package: GUI & CLI (via terminal). I tried the first one and can run the package via terminal only. I want the app to appear on Dashboard and also to be findable ...
0
votes
1answer
27 views

Connection mySQL to ws02

Folks, Im facing a problem with connecting/creating mysql database/tables to ws02 instead of h2 ws02@ws02:/usr/bin/wso2/wso2emm-2.0.1/bin$ sudo -E ./wso2server.sh -Dsetup [sudo] wachtwoord voor ...
0
votes
0answers
18 views

Control-capslock Tmux error?

I'm having trouble getting tmux to accept a caps-lock key that has been remapped using setxkbmap. I use the following: setxkbmap -option ctrl:nocaps When running tmux, the usual BASH command line ...
5
votes
1answer
66 views

need help creating an if statment that will work for my purpose in .bashrc

I have edited my .bashrc to look like this with some help from others on this forum ... Thanks guys for the help on the weather segment of this script... An issue I have ran into is the code for the ...
-3
votes
1answer
40 views

Scripting a script that tests a shell [closed]

I have a custom shell and want to test its arithmetic function. I wrote a script to test it and it performs the arithmetic but it is also trying to execute the result as a program. printf ...
0
votes
1answer
31 views

Exist some way to use cp for copy a entire folder excluding some files? [duplicate]

I've been trying to copy a entire folder to another and this it's simply adding the -r option cp -r sourceFolder destFolder But now i need exclude some files from sourceFolder. How achieve this?
0
votes
2answers
50 views

What does the “sudo” command do, and its usage mandatory?

I run my terminal commands as root but sometimes some programs (e.g., Tor Browser) say "The Tor Browser Bundle should not be run as root. Exiting." I want to understand whether this command is ...
2
votes
1answer
116 views

Can't launch graphical apps from terminal after updating to 15.10

After updating to 15.10 it's impossible to run graphical apps from terminal: xxx@xxx:~$ gksudo wireshark Invalid MIT-MAGIC-COOKIE-1 key (gksudo:5532): Gtk-WARNING **: cannot open display: :0 ...
0
votes
0answers
24 views

Ccrontab script returns empty output

I'm writing a simple bash script for analysing disk health status with smartctl and when i run it in a terminal or by script all works fine: for i in {0..5}; do echo "***** /dev/sda$i *****"; ...
3
votes
3answers
168 views

How do you extract a particular column or row from the output of a command?

Example: abcd@abcd-abcde:~$ xinput --list --short Virtual core pointer ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] ↳ Logitech USB RECEIVER id=12 ...
0
votes
1answer
42 views

Software package fails installing because of permissions

I'm busy installing WS02 on Ubuntu 16.04 LTS Server edition, right now I am facing some problems regarding permissions I guess below is my terminal log. I checked the directory with $JAVA_HOME and ...
7
votes
1answer
52 views

How can I list the packages I removed on a specific day?

On May 05, 2016, I had removed some packages from my Ubuntu 14.04 desktop. Now I want to make a list of those packages which I had removed on that day. How can I do it using Terminal? However, I can ...
1
vote
1answer
10 views

Problem exporting my database sql through the terminal

I have this issue when I try to export my database with the CLI instruction mysqldump -u [root] -p [guru99] > [guru99].sql root@YuveSys:/home/yuve# mysqldump -u [root] -p [guru99] > ...
1
vote
1answer
9 views

chrome extension to automaticly open highlighted commands from webbrowser in terminal

As the title suggests, is there a chrome extension to automatically open highlighted commands of web browser in the terminal? Wouldn't this be great?
-2
votes
1answer
33 views

Command-Line: nano VS vi

What is the difference between the command-line text editors 'vi' and 'nano'? Can someone explain this in detail and why many people prefer 'vi' over 'nano'? Thank you.
2
votes
4answers
325 views

How to find which users are currently logged in?

uptime shows among others 4 users, should I be worried? According to man uptime uptime gives a one line display of the following information. The current time, how long the system has been ...
0
votes
1answer
26 views

How to get the command for existing launcher entries? [duplicate]

How do I get the start command from an existing launcher entry on 16.04?
0
votes
1answer
57 views

How to specify a temporary folder with more disk space via terminal? [duplicate]

I need more disk space at /tmp and /usr folders. How will achieve this? An error appeared: root@kali:/home/Downloads# ./netbeans-8.1-linux.sh Configuring the installer... Cannot create temporary ...
0
votes
0answers
27 views

Clamscan is killed

After an install of clamav-daemon, clamscan is apparently giving itself a SIGKILL (exit status 137) after just showing a warning that the virus data base is older than 7 days. There is no scan ...
0
votes
0answers
18 views

How to create etc/apt/sources.list [duplicate]

The sources.list repository file simply doesn't exist because of an installation issue, causing all sorts of problems because all the commands like .deb and stuff return command not found. What is the ...
0
votes
0answers
16 views

Share folder with another user [duplicate]

How can create and share folder with another user or PC by command? I use Ubuntu 16.04 Thanks :)