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

learn more… | top users | synonyms (6)

6
votes
4answers
338 views

How to add the text before the line in whole file?

I have list of domain in text file and I need to add 127.0.0.1 ip before the line in whole file. Example as below: domain.txt .... abc.com ... I want to generate HOSTS file like ... 127.0.0.1 abc....
0
votes
0answers
26 views

Hash script to audit filesystem from /bin,/sbin,/usr/bin,/usr/sbin/ [duplicate]

I trying to do a script to audit files from many directories with md5sum sha256sum and sha512sum. Here is what I have now: #! /bin/bash clear hashone=md5sum hashtwo=sha256sum hashthree=...
0
votes
1answer
25 views

E:Type 'sudo' is not known on line 53 in source list [duplicate]

I have done some looking around for a solution. However, I have come to the conclusion that the solution to my problem is just not on the internet. I am unable to update Ubuntu and download apps from ...
2
votes
3answers
67 views

Find all python files in linux file system [duplicate]

How can I search my entire Linux filesystem for all python files (files with extension .py)? I know I can do find -name filename but how can I do it for file type?
2
votes
1answer
72 views

How can I convert these commands to work in Ubuntu?

I was just following a guide for Virtual Box. I tested the guide in Windows, since that's what it was written for. But now I want to use the same guide for Ubuntu. VB is the same on both platforms, ...
5
votes
1answer
77 views

How to close application from terminal same way as exiting it properly

Usually when running application in graphical environment, when I want to close it I click X in the top left corner of the window or go to File > Close. I would like to sometimes close these ...
0
votes
2answers
38 views

over-coming interactive command in a script [closed]

I'm trying to have a script to create containers on proxmox, & I want user to enter his password before proceeding to the creation of container, so I can push it to the main command. the command ...
-1
votes
0answers
26 views

I have problems with installing programs [duplicate]

I have problems with installing programs through the terminal. After typing a command i can not type the password. Nothing happens.
0
votes
1answer
32 views

When adding a repository can I add an auto enter command in the terminal?

When I add a repository I would like to add a command so that I do not have to press enter on my keyboard. Just like when you add -y to a command when installing a program. Is that possible? Cheers ...
-1
votes
1answer
51 views

Error while compiling a file in ubuntu [closed]

odroid@odroid:~/Modules$ make make -C /usr/src/linux-headers-3.10.96-150 SUBDIRS=/home/odroid/Modules modules make[1]: Entering directory `/usr/src/linux-headers-3.10.96-150' CC [M] /home/odroid/...
-1
votes
0answers
29 views

backup to s3 bucket on shutdown script not working in ubuntu 14.04

I edited shutdown-hook.conf via vi /etc/init.d/shutdown-hook.conf The content is description "run at shutdown" start on starting rc task exec /bin/bash /etc/my_service/uploads3.sh Then i changed ...
-1
votes
0answers
18 views

Error running make command on Odroid C1 board [duplicate]

I'm getting this error while running make on Ubuntu. I'm using a "Odroid C1" board. The error seems to be due to the mach folder not containing memory.h. odroid@odroid:~/Modules$ make make -C /usr/...
0
votes
2answers
44 views

Ubuntu - how to copy files and folders which contain special characters

I have a filesystem mounted read only which has many files with special characters like &, ( and ". I would like to copy recursively all files and folders to an external exFat volume using cp -R ...
4
votes
3answers
244 views

How to delete all files in particular folder present in current directory sub-folders excluding a certain file?

There are lots of posts where people asking how to delete files except ones, but my question is more specific. There are several folders named migrations in current directory's sub-folders, which ...
-3
votes
1answer
78 views

How to close a text file with terminal [closed]

I have a text file opened, what command do i need to type in the terminal to close the file ? I tried to kill the process but i can get the processes ID by using command ps -A | grep <app-name>...
1
vote
1answer
38 views

Terminal-Browser with Flash

I want to know if it's possible to enter a Flash site from the terminal. I'm playing a web-game based on Flash, so I want to make my server consume as low CPU as possible. I saw that I can do it, but ...
0
votes
2answers
117 views

sudo not working at all

this is the error message i get: ubuntu@tegra-ubuntu:/$ sudo apt-get update sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting sudo: unable to ...
0
votes
1answer
35 views

Reloading .bashrc after setting variables — shell script

I have a simple script that sets up a CVS repository (and other things) for work. The script has a function which should set up the repository, but it does not properly reload .bashrc. The code is as ...
3
votes
1answer
90 views

How to create a new partition in Ubuntu 14.04? [duplicate]

I'm currently using Ubuntu 14.04. It's showing the whole hard drive as single partition. I need to split the drive into different partitions. How can I accomplish this, preferably via the terminal?
-4
votes
1answer
71 views

permission denied target 'xyz' is not a directory [on hold]

Please help with this question : Create a new user called hos with password 123. In the home directory of this user, create a file called xyz, containing a list of all files and directories from /etc ...
3
votes
1answer
209 views

How to run a program in background and also using && to execute another command

I want to run my node app in background and curl simultaneously using &&. I tried the following but they don't work. node app.js &;curl localhost node app.js & && curl ...
0
votes
1answer
71 views

strange command prompt error

Whenever I have two command prompts open I always get this script coming up after I execute the commands. Just to clarify the commands execute and output correctly but after the out put before the ...
1
vote
2answers
38 views

Add the next command line after validating the first command [duplicate]

Is it possible to enter the next command line like this: command1 ; command2; After validating command1? For example I do: make And it takes a long time! I want to say: after this command: do ....
0
votes
1answer
56 views

How do I execute terminal commands by clicking an icon? [duplicate]

I'm trying to set up my sister's laptop with Ubuntu 14.04 running the LDXE shell. The only issue is, on boot, the wifi is disabled by default and I can't seem to reactivate it except with these ...
0
votes
3answers
247 views

Can't install Google Chrome on Ubuntu 16.04 [duplicate]

I am running Ubuntu 16.04 off a USB stick. I have tried to install Chrome via the Software Center and it says installing and then goes back to "install" a second later. I have also tried via Terminal ...
0
votes
0answers
16 views

Path of the Apps on Ubuntu Touch?

Im trying to understand the Ubuntu touch platform, please can someone tell me where is core apps data stored/ path and in what format?
0
votes
1answer
259 views

How to install wps office via terminal?

It's pretty complicated and sometimes the system freezes when I try to download and install wps office. I think it is much more convenient to use the terminal. But I never used installed WPS Office ...
0
votes
0answers
17 views

terminal view under Distribution Upgrade

I was upgrading from 14.04 to 15.04, under the Distribution Upgrade window, there is a terminal view of the process; I was looking at the changes when I was asked on the terminal view to update or ...
2
votes
2answers
48 views

How can I find the PID for software where the name of the software is different from the executable? [duplicate]

I run "Videos" software from the Dash in Ubuntu. After some minutes the software freezes. I've tried searching for the PID of the software to kill it, but I can't find any result with these commands: ...
0
votes
0answers
25 views

Script to delete smaller 'duplicate files' recursively with suffix

I've got an issue on my system where a image import process occasionally fails, causing some imported files to be truncated. Re-running the import process often works, but changes the imported file to ...
4
votes
1answer
22 views

Using CLI, how do I change the user's profile picture?

A similar task for changing the desktop background, can be achieved using the following script: FILE="/backgrounds/background.png" gsettings set org.gnome.desktop.background picture-uri "$FILE" ...
0
votes
1answer
27 views

How do I install missing manpages in a chroot running in Ubuntu Touch?

I am on the new Ubuntu tablet from bq, in a terminal, running in a chroot jail. I have installed man-db, manpages, manpages-dev, and even ubuntu-docs. But while man man works, or man gpp or other ...
0
votes
0answers
31 views

Comand to zip a folder with incremental file names?

I have this line in a cron command line: zip -r public_html-1.zip public_html -x *cache/smarty* It works fine but if the file exist it get overwritten. I need to change this command to create files ...
1
vote
1answer
45 views

vim syntax highlighting ubuntu touch

I'm trying to get syntax highlighting working while using vim. :version gives me: "Small version without GUI". I installed both "vim-gui-common" and "vim-runtime", but everytime I issue the ...
1
vote
1answer
73 views

Ubuntu Software Center, Update and pretty much everything else doesn't work :D [duplicate]

The Software Center closes instantly after I opened it. sudo apt-get update and all commands related to this don't work either. E: Typ »!DOCTYPE« in line 1 of sources list /etc/apt/sources.list.d>...
0
votes
0answers
36 views

How to repair Ubuntu after crash during upgrade?

during an upgrade from 14.04 to 16.04 my computer crashed and now won't boot properly. When it's loading up, I get the message that "Failed to start Load Kernel Modules", and then goes straight to ...
2
votes
1answer
53 views

Bash /proc/sys/net/ipv4/ip_forward: Permission denied

I tried to run echo 1 > /proc/sys/net/ipv4/ip_forward It says Access denied from bash, I then did: sudo chmod 1+x /proc/sys/net/ipv4/ip_forward and now it says Operation not permitted. How ...
2
votes
1answer
64 views

SSH executes the command differently

After several experiments I got to a surprising behavior by SSH. I usually access to a specific application through an SSH connection. In fact, that app is on a virtual-box on a workstation in a LAB. ...
0
votes
0answers
38 views

I can't launch Portal 2

When i launch via steam or desktop icon in my library it says Portal 2 - Running for less than a second and then stops like nothing happened if i type the launch code in the terminal this is what i ...
3
votes
2answers
57 views

How to organize my terminals?

Sometimes I'm using a lot of terminals for server communication, and what boders me is that sometimes I'm lost, so I want to organize my terminal windows by name or tag or something that will make a ...
2
votes
1answer
61 views

Access git in libertine container

I have created a libertine container and successfully installed x11 apps. I have also installed git. How can I access this, or other command line applications from the terminal?
0
votes
2answers
65 views

Add lines from file to another file

I have two files. First file (users.txt): !/bin/bash/ johnny james clara brandon steve louis daniel Second file (mails.txt) [The first line is not empty, the file contains only mail ...
0
votes
0answers
24 views

A Terminal error occurs when running rqt_remocon in Ubuntu terminal for ROS

I was trying to follow the ROS tutorial below to get rqt_remocon to work on my laptop: http://wiki.ros.org/turtlebot/Tutorials/indigo/A%20First%20Interaction When I run rqt_remocon I get the ...
2
votes
2answers
42 views

Getting file name in hex or base64

Due to a question on Software Recommendations, I thought I could implement a program that parses the output of ls -l and displays the files in an Explorer like style. This approach was suggested on ...
0
votes
2answers
64 views

Ubuntu Gnome glitches [on hold]

I just did a full conversion from Unity to GNOME Ubuntu. Now I have white background on the terminal, and highlighted text looks bad or too small. I want to restore default colors and text ...
1
vote
1answer
47 views

Can I run multiple desktop environments at once (via CTRL+ALT+F1/F2/etc.) and if so, how?

I am always interested in new ways to multi-task. I have learned that you get a terminal when CTRL+ALT+F2/F3/etc. is pressed. Is there a way to start another desktop environment in one so that I could ...
1
vote
1answer
28 views

Accessing a server directory

At my university, I have a home directory located on the main university server. To access this directory, I have been given some instructions which will mount the server on my local machine, and ...
1
vote
1answer
67 views

Change filetype using zenity

Having zero experience with scripting of any sort, I apologise if this question is too simple to be allowed here. I have discovered zenity, which I think is very useful as my memory is hopeless, so ...
1
vote
1answer
40 views

Limit to bash script execution time with interactivity?

I typically record my steps when deploying systems, and I often will duplicate the server during its initial testing. For example, if I get a little too far in the weeds while I'm testing, I simply ...
1
vote
1answer
34 views

History and aliases issue

I need help regarding shell script. How can I list all commands from history for which is already defined aliases?