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

learn more… | top users | synonyms (6)

1
vote
0answers
20 views

How can I modify “cp -ru” to remove files in destination that no longer exist in source?

I have a directory with many subdirectories and several million files. Total size around 15GB. I have a brief window (preferably around 30 seconds) to mirror changes to this directory to a second ...
-1
votes
1answer
37 views

Putty SSH client command history? [duplicate]

I connect to my server via Putty SSH client. With the key ↑ I see previous entered commands, one by one. I just wondering is there a some command, which show all previous entered commands out of a ...
2
votes
2answers
43 views

set nginx server_name variable from command

root@username:/home/dokku/appname# cat nginx.conf server { listen [::]:80; listen 80; server_name appname.wrongname.co.uk ; access_log /var/log/nginx/appname-access.log; ...
1
vote
2answers
36 views

How to know what options each command has?

I've been using linux for quite some time now and I have a question burning in my head. I'll use the mount command as an example. When you see the manpages of mount it says that you use the command ...
1
vote
0answers
25 views

replicable apt-get install command

I'm provisioning an Ubuntu server with a shell script, for definition a provisioning script should be replicable and idempotent (every time I execute the command it should always act the same). Thus I ...
5
votes
1answer
59 views

Serialise shell commands

I'm looking for a way to "stack" commands from the terminal prompt so that only one at the time is executed: First enter a command, press enter, execution starts, back to shell (like &) I can ...
-4
votes
0answers
20 views

Command Line Crash Course [duplicate]

Does anyone know a good interactive command line class or videos I can take/watch? I need to learn Ubuntu commands well enough to teach them in 2 months. Thanks!
0
votes
0answers
14 views

How to launch the FCEUX emulator that I just manually installed?

These are the steps that i did to install the latest version of FCEUX emulator (followed exactly from this forum - http://ubuntuforums.org/showthread.php?t=971455) :- Install necessary dependencies ...
0
votes
0answers
13 views

How to connect to a VPN through EC2 Ubuntu 14.04 command line?

I'm running an EC2 Ubuntu 14.04 instance and I want to connect to my PureVPN service. There are guides but they are for GUI versions of Ubuntu but not the command line.
1
vote
1answer
12 views

Cant connect to my VPS from Ubuntu Terminal

im try connect to my server using ubuntu terminal ssh -p 2222 -i mypublickey.ppk username@ip then its ask "Enter passphrase for key 'mypublickey.ppk':" Im entering my password but its always wrong ...
13
votes
4answers
307 views

How can I limit or restrict access to an application?

My son received a new laptop this past christmas, primarily for usage at his new school... And now that he has his own laptop, he's stoked to have Steam installed. But the wife wants me to remove ...
1
vote
0answers
18 views

Access network shared printer from wine command prompt

I have connect a shared printer in my ubuntu desktop and I have installed wine 1.6. I ran a vb application in wine and I want to print the output txt file of the vb application. Printer is shared in ...
3
votes
1answer
32 views

How to minimize all windows from command line in LXDE?

I need to minimize all windows from command line, I have heard about wmctrl -k on but I think it will only work for gnome, is there any possibility of doing this?
1
vote
1answer
27 views

Run C++ program like a command from the terminal [duplicate]

Hi, I've created a small program in C++ I would like to run like a command from the terminal. With that I mean that I can open the program from and in the terminal (as it is a console application) ...
1
vote
0answers
9 views

Duplicate User login? [duplicate]

I am testing my new (dual boot) Ubuntu install. When playing with basic terminal commands I noticed that i was logged in (or something to that effect) twice! Here are my commands and the terminal ...
0
votes
1answer
21 views

Find all occurrences of a word in a file and add a string to them?

I have a file containing my source code for a project I'm working on at the moment. I have the word resolution scattered over the file, and want to prefix it with self. --snippet-- resolution = ...
0
votes
0answers
15 views

I can't get the colorshemes to work in neovim

I used neovim in archlinux and colors were working fine, I used rxvt-unicode and zsh. I try to do the same in ubuntu but the colors look like crap. It's dark and not the right colors. Any ideas how to ...
1
vote
0answers
11 views

Is there a formal way to access those document in /usr/share/doc? [duplicate]

I find there are many documents for a software that I've installed. I know we can show man document by using man command. How about others, is there any formal way to access those document, or I ...
1
vote
2answers
28 views

Terminal auto complete adds aditional \

I am having the issue with my terminal and tab auto complete. If I try to auto complete using TAB for any file or folder that has a space in the name it is adding an \ before the space. For example ...
1
vote
0answers
15 views

App/Script consumes too much memory. Ubuntu may be killing it. How do I verify/check this assumption?

Hosted on Digital Ocean Ubuntu 14.04 1GB RAM, 30GB HDD I am running a python script that is reading a 200MB+ file line by line. Each line is parsed into a JSON object and then appended to an ...
0
votes
1answer
23 views

How to run multiple scripts each of which runs forever through one script?

Suppose I have the following two scripts: #!/bin/sh while true do #Do something sleep 1m done and #!/bin/sh while true do #Do something else sleep 1m done called First.sh and ...
0
votes
1answer
27 views

Why I'm receiving the message: “Impossible to resolve the host <my_name_account>”?

Since a day, each time I open a Terminal session and write any command, I'd been receiving the message: Impossible to resolve the host [my_name_account] However, the system performs any command ...
1
vote
0answers
9 views

Browser instance created through script doesn't cycle with ALT+TAB

I am using a bash file with a line chromium-browser http://www.gmail.com to create a browser instance. This browser instance doesn't cycle with ALT+TAB. How to fix this? Sometimes it does. And in ...
3
votes
1answer
46 views

list group of logged in users

I know I can see the list of logged in users, with the who command. But lets say, I want to see who in my group is logged on. How can I do that?
3
votes
1answer
374 views

How to turn current job in background?

I've ssh-ed to my ubuntu 15 server box. And I run apt-get xxx. It takes too long to download, and I don't want to stop it. How can I turn this job in background just like from the start I run it ...
0
votes
1answer
28 views

why command telnet responds strange? [closed]

i pass network course university 4 years before,i have a question that is possible amateur ,please help me.. i have ubuntu on vmware.i use this command: telnet google.com 80 it responds: ...
12
votes
3answers
2k views

How do I remove all lines in a file that are less than 6 characters?

I have a file containing approximately 10 million lines. I want to remove all lines in the file that are less than six characters. How do I do this?
0
votes
1answer
30 views

How to use upstart tasks to create a new file with today's date?

I am trying to use Upstart to create a new file with today's date. I have created a file called "Open.conf" at /home/myusername/.config/upstart I have the following lines in that file: description ...
1
vote
1answer
15 views

Jar print convert and print “$?” to 0

I have a clipscode which I want to insert in my database I wrote a Java prog for that and it is running fine in eclipse IDE if my clips code contains "$?" it preserved as it is in eclipse IDE. see the ...
-2
votes
1answer
32 views

for f in files returns sections separated by space

I have the following code arrFiles[0]=0 cd "/home/thenok/Documents/Link to thought diary" for i in $(find -type f ! -name "*~"); do arrFiles[0]=$[arrFiles[0]+1] arrFiles[arrFiles[0]]="$i" echo " ...
0
votes
2answers
24 views

How can I get just the “free swap” value from the output of the “free” command?

I know that free -m will print all the free and used memory values, including the values for Swap. However, I want to only get the numerical value for the amount of free swap on my system. How can I ...
0
votes
1answer
22 views

How do I scroll up in my terminal window? [duplicate]

I wanted to see a list of the applications installed on my "Trusty Tahr" I ran this command in the terminal dpkg --list I got a list that displayed fine except that it cuts off about halfway the ...
1
vote
3answers
96 views

How to make a line of directories with one command?

With the mkdir command if I want this location to exist ~/test/panda/fat when only the ~ part of it exists so far I have to do something like this: mkdir ~/test mkdir ~/test/panda mkdir ...
0
votes
2answers
46 views

How to make directory [closed]

How to make a directory in desktop? I tried cd /desktop command but it gives an error please give me a correct command
3
votes
4answers
50 views

where does lsusb -t get its data from?

I want to the file from which the command lsusb -t retrieves the data. I am curious to see where this is stored. and can anyone also tell that what can do with device id that displays in fdisk ...
1
vote
5answers
141 views

How do I terminate a 'Ping' without closing the command terminal window?

When I use the 'Ping' command in a terminal window, how do I terminate the ping? I have pinged my router (192.168.1.1) and the results have displayed in the terminal window, but the program keeps ...
2
votes
2answers
31 views

play sound in someone else's session from command line

I have tested playing sound via ssh console and it works with this: http://superuser.com/questions/276596/play-mp3-or-wav-file-via-linux-command-line I am wondering how to do the same in someone ...
1
vote
1answer
43 views

Grow root partition

This sounds like a very basic question, but I have yet to find an answer for it. I have a partition layout which looks like this: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda ...
3
votes
1answer
27 views

Desktop entry, or other convinent but safe way to exec multiple statements,

I'm running Gnome on Ubuntu 15.4. I want to execute two or more actions at once, but let's try with two: sudo pm-suspend gnome-screensaver-command -l pm-suspend has been added and allowed to be ...
0
votes
0answers
12 views

HDD detection with installer

I have a little problem with older Hitachi HDD(SMART is Ok). When i try to install Ubuntu 14.04 with mini.iso installer cannot find this HDD. I'm trying to install with expert-commandline option. But ...
3
votes
4answers
568 views

What is the interpretation of `awk -F':' '$2 ~ “\$” {print $1}' /etc/shadow`?

I was using the command to get the list of users logged in my machine but I can't understand the meaning of the command. awk -F':' '$2 ~ "\$" {print $1}' /etc/shadow
3
votes
1answer
31 views

Is there a way to mimic “click and drag” using the keyboard?

I'm running Ubuntu 15.10 on an old 2008 MacBook. My trackpad had an unfortunate accident (prolonged exposure to condensation) and no longer recognizes the "drag" portion when I'm trying to click and ...
0
votes
0answers
53 views

add-apt-repositories isn't working

Basically the terminal freezes for a while the I manually have to ctrl+c to end the process, then I get the following ^CTraceback (most recent call last): File "/usr/bin/add-apt-repository", line ...
5
votes
1answer
31 views

How to search through all keyboard shortcuts that use a certain key?

I sometimes set keyboard shortcuts, but as there are so many keyboard shortcuts set on my system, it is hard to know what other keyboard shortcuts you might set off when setting and using a new one, ...
2
votes
3answers
110 views

How to add PPAs through a list? [closed]

I need to add PPAs on Ubuntu 14.04.3 from a file that contains a list of repositories, as follows: sudo add-apt-repository ppa: $ (cat ppas.list) or sudo add-apt-repository $ (cat ppas.list) or ...
0
votes
0answers
20 views

aterm unresponsive unless run with sudo

I've just installed Ubuntu on my laptop. I installed aterm by typing sudo apt-get aterm Now if I start aterm by typing aterm The resulting console is unresponsive to typing (no letters show up ...
4
votes
1answer
44 views

“$: command not found ” is printed each time at the top of the terminal when I start it. Why is it doing so?

I get this error whenever I open a new terminal: $: command not found sandeep@sandepp:~$ It works as usual without any problem but why is it showing that message at the top? My laptop has Ubuntu ...
1
vote
1answer
63 views

.sh to run terminal command

This is probably insanely simple but I'm sort of new to this and have no idea what I'm doing. Very simply, I have MouseON.sh that when ran, I want it to open a terminal, run a command, then close the ...
1
vote
1answer
40 views

Some programs are running but not opening in the window?

I recently switched from windows to ubuntu.but everything seemed fine until I tried to open google-chrome which I downloaded from firefox and installed it via ubuntu gui package manager.but it doesn't ...
0
votes
2answers
31 views

Adding further variable to until command

I have the following command which works ok but I would like to add a further variable in somehow: #!/bin/bash x=40000 until [ $x = "180000" ]; do dd bs=1 if=static.file of=extracted${x}.file ...