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

learn more… | top users | synonyms (5)

2
votes
2answers
80 views

Does bash (or any shell, for that matter) have an 'overwrite' mode?

I'm running similar commands on (e.g.) a set of files. As an example, let's say I'm doing something like this (this isn't what I'm doing, it's just an example): > cat path/to/dir/file01.txt ...
1
vote
1answer
36 views

Install ubuntu with the command line

I want to install Ubuntu without using Ubiquity. I want to install it through the command line only. Not looking for Ubuntu Server install. Just help on how I can install it through the command line. ...
1
vote
2answers
44 views

Terminal and Python relationship

How is the Terminal in Ubuntu and Python programming connected? Can we use Python to control the system in Terminal? I am a complete newbie,so please guide, I installed Ubuntu out of sheer enthusiasm ...
1
vote
0answers
18 views

Problem running backup script at shutdown Ubuntu 14.04.2

I want to run a script at shutdown, and a far as I can tell I've followed the proper procedures. The script (close) is supposed to launch another script (gdrive) in a terminal which prompts me to sync ...
2
votes
3answers
185 views

Dealing with bash breaking commands of a certain length

Consider you want to run this command in bash: echo -n "Command of a specific length will break at the second run attempt." Here's the output for a 24x80 TTY: ubuntu@ubuntu:~$ echo -n "Command of ...
3
votes
2answers
183 views

How to run multiple Python files by running one terminal code?

For my text-mining project (with an Enron data set), I have this Python script: from glob import glob import fileinput with open('/media/output/inbox.txt', 'w') as out: for line in ...
0
votes
0answers
50 views

Copy directory on destination machine during .deb installation in Ubuntu 14.04, 64 bit

I just want to copy directory (which contains some files) on destination machine during .deb installation at path /opt/myProjectName in Ubuntu 14.04, 64 bit. Right now I am successfully able to ...
0
votes
1answer
31 views

Run “rails s” on another directory in a single line

I wanted to make a crontab expression at boot, running rails s in another directory. I can't find how to change directory in the same expression. I've tried rails s /directory but it doesn't work ...
1
vote
1answer
42 views

Difference between ls -l , ls -ltr and ll?

When i am using these commands , i am getting the same output but only order is getting changed for ls -ltr command. Can anyone please tell me what is the difference between the below commands? ll ...
0
votes
1answer
21 views

grep limit output number with context

If I want to find a line in file and display the surrounding context I use grep -C. If I also want to limit output to the first few occurrences I add -m parameter The problem is that grep just ...
0
votes
1answer
34 views

Can't exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16

Please help me this is a problem Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp ...
2
votes
1answer
45 views

Print characters behind the digits

function/script, that for argument in format (alphas and digits) afa5hgt3tt, errerew9ax66w, prints characters behind the digits many times as value of digit, e.g. hgthgthgthgthgttttttt ...
2
votes
1answer
40 views

Print “hello” if number of files in a directory is bigger than the number in first line of a file

Write command line that prints hello if number of files in current directory is bigger than the number specified in first line of file check. This works fine but i want a one command line. Any ...
1
vote
1answer
43 views

How to restore bash executable after accidentally delete it?

I accidentally doing something wrong, want I meant to do is: ln -svf /bin/bash /bin/sh But, I miss typing it and become: ln -svf /bin/sh /bin/bash So, bash is now a symlink that point to sh ...
0
votes
0answers
23 views

Consolas font on terminal emulators not working properly under i3-wm

I have the Consolas font configured for my terminal emulators (Terminator and gnome-terminal). My box is running Ubuntu 14.04 LTS. If I turn on my computer and log in to i3-wm the font looks like ...
0
votes
1answer
53 views

Issue while installing updates using $ sudo apt-get update [duplicate]

I have tried installing updates from terminal using $ sudo apt-get update and found below code errors. Err http://ppa.launchpad.net saucy/main i386 Packages 404 Not Found Err ...
0
votes
1answer
37 views

Is it there a Text User Interface (terminal application) which does what Kalarm do?

Since there's no updates on the enhancement request raised by @DavidJarvie on the KAlarm Project, documented in my previous question over here: http://askubuntu.com/a/257843/9598, I started wondering ...
-1
votes
0answers
42 views

I typed a terminal command and it hung up my computer?

I typed simply unity in my terminal prompt box and suddenly everything went like freeze, more over the tabs which I opened were accessible although but indeed they were slow, even the side bar wasn't ...
0
votes
0answers
34 views

Adding a file to startup list using terminal

I have created a short bash script that I want to run on startup. Adding it to the startup list through the GUI is simple enough, but I need to do it through the command-line, as I plan to access the ...
2
votes
1answer
14 views

Prevent access to a folder in WINE (running on Lubuntu)

I have a windows executable that takes in a project file name and runs it this way, under WINE (on Lubuntu). I call the below line through a batch file that resides in the same application directory ...
2
votes
2answers
27 views

Executing wmctrl from bash

After playing a little from the terminal with wmctrl, now comes the next step. Execute wmctrl from a bash script. I do achieve to execute wmctrl in a bash when it is completely alone. Example: ...
0
votes
2answers
42 views

How can I find my ubuntu's username?

When I boot system with ubuntu all I see is my background (No DASH, can't open terminal, etc). I've googled for this issue and the only solution seems to be getting to the command line with ...
0
votes
4answers
48 views

Adding a number to a already present variable sed/grep/awk

I have this in file.txt FORM: lookupfile Version: 1 LookupFile:"$i" How can I find this in the file and add a variable b to the $i. So example INPUT FORM: ...
0
votes
0answers
20 views

Execute Script in home directory on session open [duplicate]

I have a touchpad config command (synclient RightButtonAreaLeft=0 RightButtonAreaTop=0) that I want to execute on every system boot. My special requirement is that the whole config should be in my ...
2
votes
1answer
26 views

Flush Terminal Buffer?

I have a (proprietary) program which I start with ./program -a asdf in the Terminal. When I do that, I can see all the output at the right time. However, when I want to use the programs' output in a ...
0
votes
1answer
23 views

If condition fail skip to end of file

for (( v=0; v<t ; v++ )) do awk '/TRAP-TYPE/{i++}i' $fname >tron if [ "$?" -eq 0 ] then echo "MIB file found" else t=$t-1 fi some other commands echo "MIB not ...
0
votes
0answers
14 views

lxc-ls option flag error - lxc_container: command get_init_pid failed to receive response

I'm trying to use the lxc-ls command to list LXC containers on Ubuntu 12.04, but I'm getting a get_init_pid error whenever I invoke the command with an option flag. Here is an example session: $ sudo ...
1
vote
0answers
16 views

How to require root privilege to run command or alias? [duplicate]

On Ubuntu 14.04 LTS I would like to force certain terminal commands to run as root - or at least require the user password - to execute. For instance, poweroff requires sudo while gnome-session-quit ...
1
vote
0answers
20 views

Terminal collapses when it get resized [video included]

https://www.youtube.com/watch?v=pCHCpOV-Kjk After upgrade to 15.04 my terminal acting weird when i resize it, It collapses and never back to normal no matter what, i should close/re-open to get it ...
1
vote
5answers
104 views

How do I check which terminal I am using?

I have Ubuntu on my machine and I am running awesome window manager on top of it. How do I check which terminal I am running? Is there a command for it?
2
votes
6answers
519 views

Concatenate two files and separate them with a newline

I have two files: k.txt: 3 5 7 9 19 20 h.txt: 000010 100001 111001 if I just use cat, there is no newline. I need a command which would provide a file which looks like this: 3 5 7 9 19 20 ...
0
votes
4answers
57 views

What is the group id of this group name?

How to get the group ID GID giving the group name. The output would be for example: Group adm with GID=4
4
votes
7answers
759 views

How do I round numbers to the nearest integer from the command line?

There is a file I have which look 555.92 569.472 582.389 648.078 999.702 1040.75 1386.24 1418.47 1998.26 2182.13 2384.3 I would need to round every number like this 556 569 582 Ideally i don't ...
3
votes
2answers
311 views

Tee doesn't get whole output from the pipe

I have a script executing commands like: export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH;./some_app -i $INDEX | tee $LOG echo "Number of errors: $(grep "ERROR" $LOG | wc -l)" The problem is probably in ...
0
votes
0answers
12 views

Webmin Squid Commands

Whats command do I type on the CLI if I want squid to first implicit deny everyone to use the internet then afterward a command to allow the ip address 10.1.10.201 to be able to access all websites ...
0
votes
2answers
27 views

How to create a zip file from contents of a folder with certain name pattern?

is it possible to create a tar.gz file from contents of a folder but only put the files with certain name pattern in the archive and ignore the rest? for example just put the files which their names ...
1
vote
2answers
103 views

Looping tr command to remove '\r' in multiple files in a directory

I have about 260 files in a directory. How can I input these files one by one into some thing like this file is an array name file=input stream of multiple files x=0 LOOP tr -d '\r' file2 rm ...
0
votes
0answers
87 views

GTK-Message, when open a file with emacs through terminal

I'm trying to open a text file through terminal just typing: emacs file.txt the file opens on emacs, but when I close the terminal emacs closes too, and I get this message in terminal ...
1
vote
1answer
40 views

How to send terminal output to text file without newline

I am using the find command to find files of a certain type recursevely in subdirectories. I am trying to send the output from the 'find' command to a text file. However the long file paths returned ...
1
vote
2answers
27 views

How to get a recursive ftp directory listing without write permissions?

I know I can run ls * on the ftp server and get everything, but there's too much for my terminal (hundreds of pages so far). using ls * > myfile isn't an option because I don't have permission to ...
1
vote
1answer
123 views

How do I remove the brontok virus that has infected my Ubuntu via Wine?

My laptop runs on Ubuntu and was recently infected with the brontok virus it managed to infect my Ubuntu - through my flash drive - because I have Wine installed. I had used the USB in an infected ...
3
votes
2answers
54 views

How can I list connected monitor(s) with xrandr?

I'm working on developing a python application for Ubuntu that enables a user to have their desired resolution without requiring graphics drivers. In order to do this I've been using xrandr, which so ...
2
votes
1answer
31 views

oh my zsh binaries

I am trying to set a few permanent aliases in my terminal export PATH=$PATH:/Applications/orca alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' alias chem='wine ...
0
votes
0answers
16 views

Totem X and Y coordinates [duplicate]

How do I set the X and Y coordinates of the totem window using command line or config file? I'm using ubuntu. The config file in the ~/.config/totem/state.ini only has these in it: [State] ...
2
votes
3answers
160 views

Install tar.gz , but no configure folder on install file

Im trying to install RokiSim a robot simulator in Ubuntu 14.04 I downloaded the tar.gz and extracted it. But didnt find any configure folder or make file to start installaton. How do I install such ...
1
vote
2answers
46 views

How to disown a chromium or chrome app on double click

I wrote a bash script to open an app (by double click) in my chromium. The code works but after opening the app when i close terminal the app also closes. I have searched through web and found out ...
1
vote
1answer
24 views

backing up and compressing /home directory using lzma

Will this work? sudo tar -cvpf backboxhome.tar.gz/home/user --lzma I am mainly confused on where to place the --lzma argument.
1
vote
5answers
135 views

Find files belonging to a user with size in MB on Ubuntu 12.04 (Precise Pangolin)

I am using this command which is working fine: sudo find / -user web132 -ls But when I am trying like sudo find / -user web132 -ls -lh I am getting a wrong syntax error. How can I get the file ...
1
vote
2answers
35 views

tmux not reading my .tmux.conf

I have the following entries within my .tmux.conf in home directory set-window-option -g xterm-keys on set -g default-terminal screen-256color set -g history-limit 10000 However an echo $TERM ...
0
votes
1answer
43 views

How to fix this error I got while Re-installing dropbox?

How can I fix this error I got while re-installing dropbox? The following packages have unmet dependencies: nautilus-dropbox : Depends: dropbox but it is not going to be installed E: Unable to ...