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

learn more… | top users | synonyms (5)

-1
votes
1answer
810 views

how to run local shell script over ssh with su option

I have a script called test_ms.sh which I want to run over ssh along with the su - username option. I am user X on server A and server B and I have su access to user Y on server B. I do not have ...
1
vote
1answer
189 views

using awk to print variable in loop

I am beginner in working with bash script. I have a data file: i z r 0 -30 3.5 0 -29.5 3.4 0 -29 3.6 ... ...
13
votes
5answers
1k views

Difference between +x and ./<script> and sh ./<script>

Are there any actual differences between running a script with [sudo] sh ./<script>.run instead of [sudo] chmod +x ./<script>.run [sudo] ./<script>.run
1
vote
2answers
337 views

mv files with | xargs

I'm just trying to move a bunch of files (not symlinks) out of my /etc/apache/sites-enabled folder into the /etc/apache/sites-available folder with the following: /etc/apache2/sites-enabled$ find . ...
0
votes
2answers
624 views

Terminal - Search entire directory for keyword

I am working on a Ruby on Rails project so I have to manage multiple files. I think I made a syntax mistake somewhere but I'm not sure well. It would be awesome if I could search for a keyword through ...
2
votes
2answers
2k views

No csh or tcsh?

In /bin, I see bash, but no csh or tcsh. When I created a ".cshrc" file in my home directory, it had no effect; that's how I discovered this problem. So the question is this: how do I switch to ...
0
votes
2answers
391 views

How to use Terminator's Options?

Terminator has one option http://linux.die.net/man/1/terminator --working-directory=DIR Set the terminal's working directory I want to open my Terminator within a specific directory each time and I ...
0
votes
2answers
322 views

Lilypond install not working

I'm trying to install Lilypond on a 32-bit system, and for some reason the sh file simply does not want to execute itself. I'm completely new to Ubuntu, so I have next to no knowledge of how anything ...
1
vote
1answer
901 views

.pigbootup not found

I have a problem trying to get this command to run. I've got all the files in the correct directories, and i'm running the command from within the correct directory. I've downloaded and unpacked ...
1
vote
0answers
123 views

Why is this error occurring when extracting sfx files?

I'm trying to extract an .sfx file. but when i use the chmod u+x command, I simply recieve this output. Please help me. I'm a noob with ubuntu, and linu ...
1
vote
2answers
482 views

How to execute a command several times in the terminal with/without a few minor changes?

Suppose that I want to execute the command ls ten times (despite of it being purposeless since it will only display the directory contents 10 times), is there an equivalent to writing the following: ...
2
votes
2answers
82 views

Command to open a document [duplicate]

What's the command that, given a document name, will open it with the right application (i.e. an equivalent to windows start / mac os x open)
0
votes
1answer
103 views

Bring gvim forward when I open a new tab from the command line

I like my vi command to open the file in Gvim and to open it in a new tab if Gvim is already running. function vi { if [[ -z $@ ]]; then gvim elif [[ ${1:0:1} = - ]]; then ...
-1
votes
2answers
4k views

Cannot shut down Ubuntu 14.04 [duplicate]

this is my first time using Ubuntu 14.04 version. I'm not sure what I've done, but I can't shut down my laptop. But if I log in as the guest, then it will shut down if I press the button and I'm not ...
6
votes
1answer
409 views

Create a script to open firefox with some google search term from terminal

Is there any way to create a script or a program that will open firefox, go onto google and search for the arguments passed to it ? So something like google How do I shoot web should open Firefox ...
0
votes
0answers
70 views

<Enter> button does not work in Guake for zsh

I have 2 machines with Ubuntu 14.04 on them. On both machines I've tried to switch shell to zsh for Guake. As a result pressing button (to run a command) has no effect, although other ...
4
votes
2answers
392 views

How to show list of installed extensions for firefox via command line?

What is the command line to show the list of all installed extensions on the firefox browser? Is there any. I checked man firefox but did not help.
1
vote
2answers
417 views

Don't understand following error: 'mkdir: invalid option — '/'

I'm following a tutorial in a book and I'm tryin to install Oracle JDK 8. I've opened a terminal and entered the following command after the dollar prompt: sudo mkdir -p/usr/lib/jvm/ However, it's ...
3
votes
5answers
4k views

How to mass add file extension?

My photo importer moved files from my camera and renamed them, but I forgot to specify that it should keep the file extension. So I have several folders with hundreds of JPG & AVI files that are ...
21
votes
5answers
3k views

How to both display a command line's output on console and save the output into a text file?

How can I run sudo apt-get install by BOTH seeing the process of installation (long in my case) and saving its output into a text file ?
1
vote
3answers
278 views

What is the time between blinks of the terminal cursor?

What is the time between blinks of the terminal cursor? Perhaps in terms of seconds.
0
votes
3answers
91 views

Cannot reboot after upgrade to 14.04: CMOS/CPNV checksum Bad

I installed on my old desktop (which I use for my work at office) the Ubuntu 12.04. Yesterday I thought I should try upgrading to 14.04 through terminal commands which I found all around the net. ...
0
votes
1answer
100 views

Adding previously downloaded .deb files to apt using command line

How can I add previously downloaded .deb files to apt using command line so that they will not be downloaded again when I use sudo apt-get install?
-1
votes
2answers
137 views

Installing from a folder of debian files

I have a folder containing debian files for these packages: advancecomp akonadi-backend-mysql akonadi-server akonadiconsole akregator amor analitza-common ark astrometry.net audiocd-kio ...
1
vote
4answers
155 views

Which is the shortest way to list a running process?

I often need to check if a process is running, so I use one of these: ps aux | grep myprocess ps -Fe | grep myprocess top pgrep myprocess (only shows the PID) pkill myprocess (if I want to kill it) ...
2
votes
1answer
288 views

How to trim file name containing extra characters using shell commands

I have a list of thousand files which have filenames with .txt.txt appended twice, I want to remove the second .txt from the file. for eg. File1.txt.txt is the original file. I want to rename it to ...
0
votes
1answer
27 views

Ubuntu Live not Starting

All I am trying to do is recover some files from a HD on an ACER 135T desktop. Windows will not boot. So I was looking around and found UBUNTU and it sounded perfect. So I downloaded Ubuntu 14.04 to ...
1
vote
3answers
1k views

How to store system("date +%s) output to variable?c++ [closed]

Here's my problem, when I try to do long int second; second=system("date +%s); and then export the "second" to a text file i get 0 instead of 1403109... How can I export the output of this ...
0
votes
1answer
2k views

Run Task Manager In Xubuntu as Superuser

I am trying to change the priority of a process in my system via Xubuntu's Task Manager by typing sudo taskmgr, but taskmgr isn't the name of the executable. What is the name of the executable program ...
2
votes
2answers
539 views

How to use -exec option in find command

I wanna solve some problems in compiz with my brain and hands. By the way I entered following command to build compiz from source in Ubuntu 12.04 find /opt/compiz-built/share/gconf/schemas -exec ...
2
votes
4answers
13k views

Run command on another(new) terminal window

How to run any command in another terminal window? Example: I opened one terminal window and if I run command like apropos editor, then it run and out-puts on that window. But I want to run same ...
14
votes
4answers
2k views

What is the difference between standard syntax and BSD syntax?

I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example: To see every process on the system using standard syntax: ps -e ...
0
votes
0answers
279 views

I want to get current path when I open terminal in current folder in Unity

I have installed the nautilus-open-terminal, so I have "Open in Terminal" line in the context menu, but in terminal is always path to the home folder. I want it to be like in KDE: in some folder > ...
1
vote
0answers
324 views

Error occured when updating system

I have a problem during updating my Ubuntu system using terminal. Recently, there was two warning message appears on my terminal which like below: W: Failed to fetch ...
4
votes
1answer
24k views

How to make a file executable? [duplicate]

How can I make my file so that I can double click on it, and it runs. It is a .sh script, but I also have files that say: executable (application/x-executable) in the description of what they are. ...
2
votes
1answer
7k views

What does “omitting directory” mean and how do I make it cp the directory rather than omit it

I am doing a data recovery for someone and enter the following command -Ubuntu:~# cp /media/Macintosh\ HD/Users/orlandocampoverde/Desktop\ (original)/VIDEOS\ ESPANOL/ /media/\$G\$\ ...
1
vote
2answers
81 views

How do I choose among the tab directory completor in terminal?

I type in for example: cp /media/Macintosh Then Tab so that it can correctly put in the formatting for Macintosh HD I then want it to complete among a few options if you press tab.. for this ...
5
votes
2answers
506 views

Is there any command to show how much time your ubuntu is on?

is there any command which tells you, how much times you turn on your Ubuntu? For example in 8 AM you turn on ubuntu and at 10 AM you write that command and the result is two hours?
3
votes
1answer
10k views

How can I fix “setenv command not found ” error ? (Ubuntu 12.04.4)

I use Ubuntu 12.04.4. I install tcsh. But I still see this error : No command 'setenv' found, did you mean: Command 'netenv' from package 'netenv' (universe) setenv: command not found How can I fix ...
1
vote
1answer
316 views

How to run ''top'' command 1 time and exit?

Is there any switch to tell top command in order to one time scan the system and do not monitor it all time?
0
votes
1answer
38 views

What is ABecho command line in Teamviewer Package

I convert a debian package to tgz package using alien -t . Then , i browse this new package to inspect some scripts : One of script includes this code: ABecho "teamviewer" "run teamviewer ...
0
votes
2answers
77 views

script terminate

# Check if VPNC is already running, otherwise start it if ( ps -ef | grep -v grep | grep -v vpnc_ondemand | grep -v less | grep vpnc > /dev/null ) ; then echo "Shell script is already running ...
0
votes
0answers
17 views

Getting an error while installing wine on ubuntu 12.10 [duplicate]

i am getting following error while installing wine... can any body help? The following packages have unmet dependencies: icedtea-7-plugin : Depends: icedtea-netx (= 1.3.2-1ubuntu0.12.10.3) but ...
0
votes
1answer
31 views

Is there other way to get your DISPLAY env without using shell?

I have a script that will get executed by incrond when it sees changes in a watch dir. There is only a few env vars that are available in the script, the rest get cleared by incrond. So this becomes a ...
0
votes
1answer
551 views

no Terminal commands are working at all after install of Lubuntu 14.04

I am at a loss. All that I get are error messages. And it is not random. All Terminal commands are reporting errors. I was advised to re-download Lubuntu and to be sure that the MD5Sum was correct. ...
1
vote
0answers
25 views

What is the command to bring up GUI shutdown box? [duplicate]

Unity brings up a window with shutdown/reboot options when pressed my pc power button. But how to do that with a command?
1
vote
1answer
73 views

Understanding the at-command to schedule another command

I use cron to schedule things in Linux, but recently I discovered the "at" command. sudo apt-get install at I don't understand the scope from which this command operates: How would you schedule a ...
2
votes
2answers
157 views

Shell Scripting Function question

I have this code snippet I am working on for a small project I am doing: echo "Please enter SUID: "; read $uid uid_Assoc(){ arg1=$1 echo $1; } uid_Assoc Now to start, I would like ...
1
vote
2answers
45 views

More information about df

At my work, I have to delete/purge certain things on the HD to our servers. I usually check df -h afterwards to check the available space and usage. And sometimes I noticed that this does not update ...
7
votes
1answer
4k views

Error Password: chsh: PAM: Authentication failure when try to install Oh my zsh

I try to install Oh my zsh. After install zsh (sudo apt-get update && sudo apt-get install -y zsh) Then I install sudo apt-get install -y curl then install git. the problems occurs ...