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

learn more… | top users | synonyms (6)

0
votes
0answers
9 views

How do I cd into a webdav share (so that I can ls)

Objective is to generate a text file listing all folders/subfolders/files in a directory on a network share (a website I manage). I've successfully connected to the server using nautilus (using path ...
0
votes
0answers
7 views

How can I fix the following error? - “sendmail: fatal: Recipient addresses must be specified on the command line or via the -t option ”

When I am trying to send a test mail from 'cacti' web-console, I am getting the following error in the logs as well as the web console. How can this be fixed? > "sendmail: fatal: Recipient ...
2
votes
1answer
20 views

how do I exit the purple command screen?

I switch my laptop on then it's intro is normal then suddenly it appears for me somestuff written and at the end written failed Then after 1 minute/lesser a list of commands or operating text appears ...
0
votes
0answers
5 views

How to remap keys to a mouse button

I want to remap the right Ctrl or right Alt key to a right mouse button.I used different tools like xev ,xmodmap and xdotool,butit didn't worked.
1
vote
1answer
14 views

unable to change owner for my drive

I am new to Ubuntu OS. I have noticed that once of my drive 480 GB drive partition is owned by root. I was trying to change the permission to user skorlam (my user name) but it says : ...
0
votes
0answers
16 views

Only COPY doesn't work on terminal [on hold]

I'm using RHEL5 64 bit, Gnome terminal 2.16.0. I can copy external text and paste it into the terminal, but i'm not able to copy anything from within the terminal. ctrl+shift+C doesn't work. ...
0
votes
1answer
17 views

mariadb-server syntax error

I am writing a bash script and having trouble with $PASSWORD. Can anyone please tell me the correct way to write sql lines in bash script? QUERY="GRANT ALL PRIVILEGES ON db.* TO 'user'@'localhost' ...
2
votes
1answer
20 views

“file /var/log/syslog is being edited” message in nano

To the best of my knowledge, I can view /var/log/syslog with the command sudo nano /var/log/syslog and successfully did so several times during a session; however, I was trying to search the log ...
1
vote
0answers
17 views

How to quickly get the reason for the most recent update of a package from the command-line?

Is there a command-line command I can run to quickly determine the reason for a package update? Ideally, a command that dumps a set of URLs to all of the relevant information. For example (it's a ...
0
votes
1answer
23 views

Prevent other users in same group to change my own file?

I have a share directory with another user, say Bill. The directory has permission as 775. I create my own file with the same permission in the directory. My file has owner and group as my user ...
0
votes
1answer
20 views

Print different output in the same csv file

I'm writing a script to analyse some data. I have several subset of files, and I would like to count the line from these files and write the result into a csv file. I'll try to do an example. I have ...
-2
votes
0answers
29 views

How can I shutdown multiple systems using terminal?

How can I shutdown multiple systems using terminal? Also, is it possible to send a message to multiple computers before shutting them down? Thanks in advance :)
0
votes
0answers
20 views

Terminal Closing unexpectedly

I'm trying to install openjdk-7 in my ubuntu. but after running that command the terminal closed directly. This is happening every time when i run commands. Terminal close directly without any warning ...
0
votes
1answer
14 views

Interpreting !12 as string and not as terminal history

Using the sample command below in curl, it doesn't work as expected: curl -ik "http://localhost/index.php?username=parto&password=hello!23" I expect the parameters to be passed to include: ...
0
votes
2answers
28 views

Ubuntu 15: after installing and configuring java, echo $JAVA_Home is working, Java -version is not working

I have installed the oracle Java 8 and configure it. cmd-> echo $JAVA_HOME /usr/lib/jvm/oracle_jdk8 cmd-> echo $PATH ...
-5
votes
1answer
32 views

How do I generate the range of strings “9811@000000#” - “9811@999999#” using `crunch`? [on hold]

How do I generate the following using crunch? 9811@000000# 9811@000001# 9811@000002# 9811@000003# ... 9811@999999# I tried this but it failed: crunch 12 12 1234567890 -t '9811@'@@@@@@# -l ...
1
vote
2answers
46 views

How to check if script was executed via command line or double-clicked?

How can I determine if a script was invoked from a command line or via double-click in file manager (Nautilis)? If the former, I still have a command prompt when the script finishes, but if it was ...
0
votes
0answers
8 views

libperl5.20 rxvt-unicode-256color Ubuntu 14

I want to install new version of rxvt-unicode-256color (with clipboard suppport), but on my system have perl 5.18 which is not compatible with new version of rxvt. I'm tried to use perlbrew. But ...
-4
votes
1answer
27 views

**…** what are these dots meaning? [on hold]

>>> num=int(input("enter the number:")) enter the number:24 >>> if(number%2==0): **...** print("the number is even") File "<stdin>", line 2 print("the number is even") ...
1
vote
2answers
84 views

How to run a script from terminal [duplicate]

Hi I would like to run a script from the terminal, is there anyway to do that? For example : if I have a python script I would normally run it with this command : python script.py How can I run ...
3
votes
2answers
41 views

Replace first column on a file

I have the following file. 101; John Bauer; 811-7780831; 102; Anthony Higgins; 844-4317627; 102; Anthony Higgins; 844-4317627; 103; Arnold Sipes; 866-4343123; 104; Donald Quinn; ...
1
vote
1answer
29 views

Does the 'at' command require a full path to the script's name?

I'm running Ubuntu 14.04 LTS. Sometimes I use the at command to run a Bash script one time like this: at -f goscript 8:00pm (Execs need me to run a report at a time not in crontab.) Is that the ...
0
votes
1answer
19 views

Print a String on Its Own Place in Unix Shell

I'm trying to print contents of a text file(actually its strings). I'm familiar with some commands like grep, awk, sed; I forcibly want to echo string on its original place in file and I couldn't. You ...
1
vote
3answers
36 views

how to give each terminal tab its own title?

I see that there are ways to set the tabs title through the CLI, but how can I give each tab its own "title"? top pine git by default, gnome-terminal seems to show ...
7
votes
5answers
360 views

Bash - Check directory for files against list of partial file names

I have a server which receives a file per client each day into a directory. The filenames are constructed as follows: uuid_datestring_other-data For example: ...
0
votes
0answers
16 views

Specification of Shell variables [duplicate]

I know the environment variables are located in /etc/environment such as PATH. Where can I find the configuration file of specific shell? Few places maybe /etc/profile, /etc/bash.bashrc, ...
0
votes
1answer
30 views

I found in a test “navigate to the bin directory, make a file of entries i find there and store it in your personal directory” [on hold]

How do i get to bin because every time i try in terminal it says there no such file or directory as bin, ive tried cd bin, cd ..bin cd ../bin. I want to point out i have no idea what im doing and ...
0
votes
2answers
41 views

How do I change a variable of a background function?

I have been working on a script for my father that manages several tasks through a script with many functions that chain together (organization purposes). This script relies entirely on zenity for all ...
0
votes
0answers
9 views

Upstart Ruby version issue

I am trying to get Upstart to fire up Sidekiq (https://github.com/mperham/sidekiq/wiki/Deploying-to-Ubuntu). I can manually start it but the same command fails in the Upstart script. I have piped ...
0
votes
1answer
29 views

Bash script not running [duplicate]

So I'm pretty new to ubuntu and I'm trying to make a simple bash script that all it does is running Rubymine so I don't have to write it down in the command line everytime and also so I can have it on ...
0
votes
0answers
15 views

Configuring Postfix gives error E: The package lists or status file could not be parsed or opened [duplicate]

I'm trying to configure postfix mail server on Linux mint 17.2 When I try to execute following command aptitude install postfix libsasl2 ca-certificate libsasl2-modules This command gives me error ...
0
votes
0answers
21 views

Bash terminal : Revert change of 'interrrupt' (CTRL-C) shorcut key

I changed something on my system/terminal to change the shorcut key for interrupt the process in my bash terminal, I switched from CTRL+C to CTRL+J. However, stty -a gives: $ stty -a speed 38400 ...
-1
votes
1answer
24 views

gnome-terminal --disable-factory support problem

gnome-terminal --tab --title="700" --disable-factory -e Failed to parse arguments: Option "--disable-factory" is no longer supported in this version of gnome-terminal. i have gnome3 Any ...
0
votes
0answers
14 views

setpath in .sh script is not working [duplicate]

This is my .sh script. #!/bin/bash export PATH=$PATH:/home/srilm-1.7.1/bin When I am using this script file I could not add the environment variable path for temporary purpose(though the script is ...
0
votes
1answer
18 views

Disable 'record file and application usage' via command line

I am creating an install script. I would like to know how to disable the recent files appearing in the unity dash. I can disable them manually via settings -> security & privacy -> files ...
3
votes
0answers
20 views

Can't change gedit preferences and terminal preferences don't save

I'm new to Ubuntu and Linux in general. I've just started using it for one of my college courses and instead of having all of us install Linux on our machines they had us install a virtual machine ...
1
vote
1answer
28 views

I would like to batch re-size images in a terminal

I've got like 500 images to resize, I'm not going to do that in gimp...a terminal solution would suit me best. On ubuntu 14.04. I've read this question on stackoverflow (first posted the question ...
-1
votes
1answer
46 views

I can't use the ./ command in USB flash drive [duplicate]

I recently got Linux, and wanted to run the game dwarf fortress in my USB flash drive. To run dwarf fortress on Linux you have to use ./df in the dwarf fortress folder, but when I use this command it ...
0
votes
2answers
47 views

how to play video using terminal on ubuntu server

A few days before, I installed Ubuntu Server 14.04 on my android, but it has no gui so I can't play video. Is there is any way to play video using terminal?
0
votes
0answers
14 views

Shrink Terminal Prompt Path [duplicate]

This has crept up on me over the past many weeks to the point I am getting annoyed by this lengthy string as it gets in the way of reading the output messages. Here is what my Terminal looks like: ...
-1
votes
0answers
22 views

directory creation and ownership [on hold]

I have certain directories like backup/data/cm/au and backup/data/cm/Di .Ineed to create the directory path from cm/au and cm/Di in /Tmp.with the same ownership as that of the Orginal directories.I ...
0
votes
0answers
17 views

Bash script: How to concatenate input parameters with strings? [duplicate]

I want to define an alias bak_log which uses an input parameter to backup all files starting with such string I can't find the way to concatenate the input parameter with other strings in order to ...
2
votes
1answer
79 views

How can I determine if a process has a window, and subsequently show, hide or close it?

Is it possible, either through a shell script or terminal command, assuming you have the PID, determine if it has a main window (form), and then get info about it (title) and show/hide/close it?
0
votes
0answers
13 views

How to rsync files that match “*/folderName/*”

This is to help other suffering from rsync multiple subfolders that match the name small, since i have several folders named small #version1 not work everything is synced rsync --verbose --recursive ...
18
votes
4answers
3k views

Why does 'ls > ls.out' cause 'ls.out' to be included in list of names?

Why does $ ls > ls.out cause 'ls.out' to be included in list of names of files in current directory? Why was this chosen to be? Why not otherwise?
0
votes
3answers
50 views

How do i efficiently use environment variables?

I'm curious about learning about choosing correct env. variables. How to make out setting what env. variable would get the job done Example: if you want to make sure that command history always ...
0
votes
0answers
35 views

Bash script not working with shortcuts

My bash script is working flawless when i call from terminal. However, when i create shortcut to it acts weird. #!/bin/bash url="" function uploadImage { url="$(curl -s -F "file=@$1" ...
0
votes
0answers
13 views

PHP in command line failed : ERROR: memdup failed

After an upgrade to 14.04 LTS, I discovered I have some trouble with PHP. It is impossible to execute maintenance script by command line: [root@xubuntu log]# php ERROR: memdup failed I get ...
1
vote
2answers
31 views

find: missing argument to `-exec' [duplicate]

I am having problem with the find and grep commands. I want to find the files which are *.doc and match the pattern Danish from that file with grep command. I am using -exec to combine them but it ...
1
vote
2answers
54 views

parsing `/etc/passwd` file to find users with Interactive shells

I want to parse /etc/passwd file to find out if the user can run interactive shell. I know the 7th field in each line of /etc/passwd file tells the path of shell. But How do you say that, defined ...