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

learn more… | top users | synonyms (6)

2
votes
3answers
832 views

How to run a bash script after 20 sec on Login?

I want to run a bash script like: #!/bin/bash echo 'cpu limit bomi player at 40%' cpulimit -v -e bomi -l 40 Just 20 seconds after Login into my user. Can you please help me to do that? ...
2
votes
2answers
556 views

Timing limiter for execution of commands in Bash/Shell Script

I have a shell script which looks like this: echo firstOutput read -s command0 command1a command1b command1c echo secondOutput command2 command1a, command1b, command1c are individual commands but ...
2
votes
2answers
199 views

When to use a preceding slash in path names? (e.g. for the 'cd' command)

I am a novice user and I am trying to install Oracle Java. The process calls for me to access /usr/local/java, but here is the problem. I get as far as /usr/local, then this is the message I get: ...
0
votes
2answers
104 views

What does '~$' mean? [closed]

I just reset my username and password and am logging in for the first time since reset. After entering username and password, I get a prompt username@ubuntu:~$ What do I type in for that?
13
votes
1answer
958 views

opposite of eject command?

I have a ton of CDs to image, and I just got curious. I can eject with the eject command. What command inserts the disk tray back into the CD drive? yes it is the type that can pull the tray back in. ...
4
votes
3answers
359 views

improve bash script

I have a quad core desktop, and i wanted to know the average temprature according to sensors. so i wrote this bash 1 liner. echo `sensors -A | awk {'print $3'} | sed 's/+\|(crit\|0:\|°C//g'` | awk '{...
3
votes
3answers
6k views

ps -xa | grep node to kill specific process

I am currently using the following command to get a process: ps -xa | grep node Which results in the following: 13611 ? Sl 0:03 /opt/brackets/Brackets-node /opt/brackets/node-core 20713 ...
2
votes
2answers
85 views

Internal Differences Between File deleted from GUI and CLI

I am using inotify system call for watching one of my file for all the events (delete,modify etc). But When I deleted file from GUI, no notification was fired. Whereas when I deleted file from CLI ...
7
votes
3answers
560 views

How do I search shell command history with a text editor?

I know that Ctrl+R let's you search command history, but it's a little primitive. Is there a way to export all my command history (not just the current terminal session, but the full history) to a ...
0
votes
2answers
64 views

Using “users” command gets my name 2 times?

I was looking for some shell commands, and I took a look in "users" command. I was hoping to get only 1 name, but I got 2: nori@nori-hidamari:~$ users nori nori And when I run the command "who" ...
3
votes
1answer
145 views

Is there a bash/terminal command that will clear content prior to the last command?

Use case: I'm working in bash/terminal and have been typing several commands and I've just run something and it's spewed some output. I'm trying to find where that output started and have to visually ...
0
votes
1answer
126 views

how to stop using export command

every time I run gdb I have to type export SHELL=/bin/bash or gdb would return exit with code 127 my question how to make this command run every time automatically without need to re type it because ...
0
votes
2answers
108 views

Ubuntu Password Change [duplicate]

I am trying to change my password. I was able to change the password using the root shell, then I rebooted my computer. I tried to login using the new password and it seemed to work, but after putting ...
1
vote
0answers
17 views

rmod iwlagn error message (it is not loaded)? [duplicate]

I'm trying to fix my slow wifi connection and when I typed the command I got an error message. rmmod iwlagn: rmmod: ERROR: Module iwlagn is not currently loaded
3
votes
1answer
461 views

Create zip files in /var/www/html using crontabs

As the title explains, I'd need to take a file and put it into a zip archive once a day; also, the zip file has to be moved in /var/www/html, where a .php scripts allow users to download it. Assuming ...
0
votes
2answers
2k views

How to get the pid of a process in Python [closed]

I wrote this script to stop processes: parser = argparse.ArgumentParser(description='this script allows you to connect a device in your network') parser.add_argument('-m', '--mac', dest='mac', ...
1
vote
2answers
94 views

How to get a list of the package home pages in a repository section from command line?

A while ago, I asked here about how to get the list of packages in a repository section from the command line. According to the Synaptic Package Manager, many of these packages feature a home page. ...
1
vote
0answers
453 views

Bash script: command not found

I have an executable script install_packages.sh in /home/etienne/admin folder. The directory's path is added to $PATH variable from /etc/bash.bashrc. When I type #echo $PATH I see that the variable ...
0
votes
1answer
125 views

Problem with terminal transparency

I have a problem with the terminal on my Ubuntu netbook. Whenever I open the terminal it is completely transparent without a menubar or anything, and I can't see the text at all. Right clicking on it ...
10
votes
3answers
8k views

How to list files older than a day with “2015” in filename?

I want to list all the log files which do not belong to today and only the files that contain 2015 in their names. These are the commands I have tried: find . -name 2015 -mtime +1 -exec ls -ltrh {...
0
votes
2answers
701 views

Steam games in usr/bin

I use /./usr/bin/applicationname to launch programs using terminal, but steam games (or steam) doesn't show up in it, although I can put a steam game in my favorite applications list. Is there any way ...
0
votes
2answers
188 views

How to scan more than one location at the same time with ClamAV

When scanning my computer with ClamAV what I normally do is execute something like: sudo clamscan -r --detect-pua --infected --bell / | tee ClamscanLog16.txt But sometimes I am scanning more than ...
0
votes
2answers
133 views

How to set the initial number of columns in gnome-terminal when opening multiple tabs?

I am trying to output log text to gnome-terminal tabs from the command line. This can be useful for saving session data and later restoring it. Here is an example: #! /bin/bash long_text=$(awk "...
2
votes
1answer
309 views

How can I install IDL 8.4 from .pkg installation file on Ubuntu?

I would like to install the IDL 8.4 on my Ubuntu 14.04... The installation requires starting the Install_IDLENVI.pkg installation app. Everything I have tried so far following various advices on ...
2
votes
2answers
394 views

How to set active tab in gnome-terminal?

When I open gnome-terminal with multiple tabs from the command line, I would like to preselect (on the command line) which one of the tabs should get focus. I tried gnome-terminal --tab -t A --...
0
votes
2answers
277 views

when ssh is run with a server + command argument, what startup profile runs if any?

I know /etc/profile and ~/.profile are among the start-up scripts used when ssh is used to login to a server – i. e. using ssh with server argument. However, the scenario where I am just using ssh ...
1
vote
1answer
148 views

Problems installing rEFInd through windows after Ubuntu install

I installed Ubuntu alongside Windows and I can't figure out how to boot into Ubuntu. So now I'm trying to install rEFInd. Fallowing the instructions here I ran into a problem running the xcopy /E ...
4
votes
1answer
157 views

How to display completed print jobs with source URL

In the "view queue" GUI of my printer, I can click "show all completed jobs" and get the columns Job|User|Document|Printer|Size|Time Submitted|Status I hunted around for some way of doing this in ...
1
vote
1answer
115 views

I need help with this file, i edited it wrong, what do i replace with?

What comes after the second CHROMIUM_FLAGS= in gedit? I did the wrong thing when trying to install pepper flash. i went by confusing instructions and now i want to just return this file to normal, i ...
1
vote
1answer
248 views

How to save working directory in gnome-terminal?

How can I save the current working directory in different tabs in a gnome-terminal? I am looking for a script or a command, that will save the working directory of each open tab, without having to ...
1
vote
1answer
52 views

How can I use my own shell as the login shell?

Suppose that I have a mini-shell, named minish which provides only cd, ls, rm, mkdir, etc. minish is saved in ~/Desktop/Shell. It can be used from other shell, such as bash, by calling just ~/Desktop/...
0
votes
1answer
67 views

Network and terminal proxy [duplicate]

I use my Ubuntu 14.04 laptop in 2 networks. One of the network requires a network proxy. So suppose initially my laptop doesn't has any network proxy added to it. I switch it on and add the network ...
1
vote
1answer
2k views

Bashscript making a variable equal a command. error command not found

Hi i keep getting the error ./imagehash.sh: line 2: =: command not found When i know that i set the $CMD variable correctly (i tried the command outside the bash script and it worked just fine) ...
14
votes
4answers
2k views

I change the last line in /etc/passwd and I can't use sudo

Here is what I have done: Change a username in the last line: tiny to abc tiny@tty7:~$ sudo vim /etc/passwd Change this: tiny:x:1000:1000:tiny,,,:/home/tiny:/bin/bash to this: abc:x:1000:1000:tiny,...
0
votes
1answer
81 views

How to open a file outside of the home folder using sudo

I recently had an error with cinnamon desktop environment that I know how to fix. There is just one stupid obstacle in my way, when I try to use sudo gedit var/lib/dpkg/status to go to that folder ...
0
votes
1answer
274 views

Open up new terminal and run script with double click in Unity

I want to execute expect -c " spawn ssh user@10.0.0.0 expect \"assword:\" send \"pass\r\" interact " in a new terminal by doing double click in an .sh script. I tried #!/bin/...
1
vote
1answer
1k views

The difference between the different APT upgrade commands

I have seen and used all of these commands to upgrade packages on my system, but why are there different commands for this? Do they all not do the same thing? And if not, then in which situations ...
10
votes
4answers
22k views

How to create multiple files with the Terminal?

I've been learning to program with a really cool introductory book to C and I write off every example and task so I can learn the syntax by heart. I did every file manually until now, but the clicking,...
2
votes
1answer
159 views

Automatic User Creation for SSH Server?

I'm trying to setup an SSH server which, upon an attempted connection with the correct public key, will create a new user account if one does not exist. On connection I'd like a specific script to ...
1
vote
1answer
104 views

How to highlight a searched text in vim editor?

I have vim editor version 7.3 However in this when I search for a test by typing :/SEARCHTEXT the cursor goes to the line containing the text which is searched, but the text itself is NOT highlighted....
8
votes
4answers
11k views

How to show (just) the IP address of my router?

What command can I run to get just the IP address of my router? With this command I should have only IP of my router and not, for example, the whole routing table (as when I run route -n).
1
vote
2answers
182 views

Difference between “ ” and ' ' in bash

I am trying to figure out what is the difference between " " and ' '. When I use them with echo they both give the same result, sps@sps-Inspiron-N5110:~$ echo Hello world Hello world sps@sps-...
0
votes
1answer
498 views

Error during installation gem 5 in full system mode

On giving the command below in gem5 directory **build/ARM/gem5.opt configs/example/fs.py --disk-image=/home/pradnya/full_system_images/aarch-system-2014-10/disks/aarch64-ubuntu-trusty-headless.img** ...
3
votes
4answers
4k views

How do I get the MAC address of my router?

Is there a Linux command that allows me to get the MAC address of my router?
0
votes
1answer
50 views

What is the difference between sh and ./ [duplicate]

When given a binary in a terminal, you can launch it via sh myapp or ./myapp Are there any other ways to launch the app? Is there any difference between sh and ./ ? What do they denote/stand for?...
2
votes
1answer
122 views

Deleting user from sudoers [duplicate]

Hi I executed this command sudo adduser username sudo and am wondering how do I take that username out from being able to execute sudo. I checked the sudoers file but the username that I added thru ...
1
vote
1answer
2k views

How to rename a file using find command

I am trying to rename a file using find command. I am trying to rename file-a to file-10. To do this I first tried below command: sps@sps-Inspiron-N5110:~$ find ~ -type f -name test-a -exec mv test-...
10
votes
1answer
9k views

How to change file ownership when chown says “invalid user: ‘–R'”?

ubuntu64@ubuntu:/$ sudo chown –R hduser:hadoop mongodbdata chown: invalid user: ‘–R' When I try to change the ownership of the file, I am just getting invalid user: '-R' error.
2
votes
2answers
1k views

cp problems with copying root

I have a little bash script going to check if the system has been backed up today and and if it hasn't then it copies the entire filesystem into the backups folder: date=$(date +"%m%d%y") sudo mkdir -...
2
votes
1answer
2k views

how to uninstall emacs from command line?

I have ubuntu 12.04 I installed emacs using below commands. $ apt-get update $ apt-get install emacs Then, as expected, I could find emacs while searching in dash. Next I wanted to uninstall ...