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

learn more… | top users | synonyms (5)

12
votes
2answers
953 views

How to merge images in a single PDF file

I have some images which I want to merge. The meaning of merge is that, if I have 5 images, I want to put hem near each other is this way: I want to do that command line. For example the command ...
2
votes
3answers
3k views

Trouble using cd command with “~” or “$HOME” in bash scripting

We know that ~ and $HOME refer to the home directory of the current user. (For me echo ~=echo $HOME=pandya). But I can't use it in bash scripting. Here is a simple example script: #!/bin/bash echo ...
0
votes
1answer
76 views

remove directory to Grandpa directory and delete the parent directory

Sometimes , we note that we have unuseful nested containers(directrories) . For example mkdir -p ~/grandpa/pa; And pa directory is the only file existed on grandpa. Hence , all files of pa ...
2
votes
2answers
459 views

Run program through terminal with custom name [duplicate]

I want to run a program, for example gedit from terminal. How can I run gedit through terminal by just typing ge on terminal?
3
votes
3answers
192 views

How do I move thousands of files from a list?

So, I have a list of files in a text file. I believe it's about 100,000 files. The files in said list are spread across many directories, have different sizes, filenames, extensions, ages, etc. I am ...
12
votes
2answers
3k views

Making my first bash script, can't get the cd command to 'stick.' [duplicate]

For my first bash script, I want to create something that's really been annoying me: when I switch folders, I want the contents of that folder to be displated automatically. I tried adding this ...
2
votes
1answer
286 views

Why does apt-get abort by itself, as though I'd pressed 'N'?

On Ubuntu 14.04, when I try to install an app or even just do: sudo apt-get upgrade I always end up with this message at the end: Do you want to continue? [Y/n] Abort. I didn't type anything, it ...
0
votes
0answers
164 views

Console Mode VIM 256 Color Support

This question is about using the console mode (i.e. ctrl+alt+f1) and not about using a terminal emulator. When running from a terminal emulator, my VIM uses 256 colors without a problem. I've tried a ...
0
votes
0answers
597 views

Invalid entry length (0). DMI table is broken! Stop. displayed when enquiring about system-product-name in the terminal.

When I type this command: sudo dmidecode -s system-product-name in my terminal on a dual boot system with Mac 0SX 10.9.4 and Ubuntu 14.04. I get the following output: MacBookPro11,1 Invalid ...
1
vote
1answer
146 views

uTorrent server only working with 'sudo -i' option

Apparently it's not a working/not working issue. I have setup uTorrent server in my Xubuntu 14.04 following these instructions. How do I install utorrent on ubuntu 14.04 other instructions seem ...
0
votes
1answer
105 views

block certain dangerous commands?

In my High school there are few computer having Ubuntu 14.04 installed and many students know the Root password, how can I block/disable certain dangerous commands like :- rm -rf / rm -rf * ...
2
votes
1answer
545 views

Fullscreen and Repeat Video with Totem Player

I want to open a video from command line and I want the video to be opened as fullscreen and be repeated forever. I searched for fullscreen, and found the --fullscreen switch in Totem. However, ...
1
vote
1answer
46 views

Terminal message “Access control disabled”

Every time I open up the terminal the message access control disabled, clients can connect from any host pops up in the first line. Then the terminal behaves as usual, no errors at all. But this ...
2
votes
1answer
86 views

script in bash not understood using terminal in Ubuntu 12.04 [closed]

Can anyone tells me what does this script means found in a .sh file:: [ ! -n "$T_R" ] && echo "Message Appear" && exit 1;
0
votes
1answer
50 views

var.sh is not exporting the variable using terminal

I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise. This is the script used: #!/bin/bash txtrst=$(tput sgr0) # Text reset ...
0
votes
1answer
61 views

Incorrect shell password correct terminal password

I'm trying to make some changes from the ctrl+alt+f1 menu, but the shell only rejects my login ("login incorrect" message). This is the same login and password that is accepted EVERYWHERE ELSE I'm ...
0
votes
1answer
302 views

How to convert Arabic subtitles to utf8 the right way?

Most DVD burners (if not all) ask for subtitles to be encoded in utf8, sure that's easy for file in *.srt; do ◀ iconv -f ISO-8859-1 -t UTF-8 -o "$file".utf "$file" && mv "$file".utf "$file" ◀ ...
1
vote
1answer
196 views

Declare a variable when running the script bash

How to declare the variable content when running the script? I know that is possible to use $1 $2 $3 to set a variable when running the script ./script.sh this is sparta, but I did not found a way to ...
0
votes
1answer
275 views

wicd-curses problem on Ubuntu 14.04

How to get wicd-curses to work on Ubuntu 14.04. This command works great on Ubuntu 12.04.
0
votes
2answers
332 views

Getting List of Running processes and applications

How can I see which application and what processes are running recently after the login using terminal command.
6
votes
2answers
3k views

Undo copy (cp) command action

I copied some file from source folder into destination folder by using bellow command line in terminal. sudo cp From_SOURCE/* To_DESTINATION/ Now I want to undo this command.
0
votes
1answer
220 views

call shell script from php when ubuntu 14.04 (rightly) disables the shell for www-data

I just migrated from 12.04 to 14.04. 14.04 (sensibly) disables login / shell for www-data. But my php site needs to run some shell scripts to run stuff like kindlegen, rsyncing files to another server ...
0
votes
0answers
52 views

Permissions when running second level script

Evening Everyone, I have 1 bash script that starts the program Motion (some may be familiar with). Motion links to a script in the motion.conf upon picture save or file save to a perl script that ...
0
votes
2answers
70 views

Why doesn't this second nohup command run?

Everything runs except the last line: #!/bin/bash xinput set-prop 11 "Device Accel Profile" -1 xinput set-prop 11 "Device Accel Velocity Scaling" 1 xinput set-prop 11 "Device Accel Constant ...
0
votes
3answers
212 views

How do I get my shell script to automatically accept prompts?

I made a simple shell script (that I run as root) to download essential apps that I might need whenever I reinstall ubuntu: It looks like this: apt-get install docky && apt-get install geany ...
2
votes
4answers
142 views

Moving all files of a certain type or extension

I have a large external with many subfolders that I want to move all videos, pictures, and music to another hard-drive, what would be the best way to do this?
0
votes
4answers
436 views

Running {command vs through bash script} + redirect output

I am not sure if it is one or two issues here: file /usr/bin/line1 wine /home/aiao/.wine/drive_c/Program\ Files\ \(x86\)/LINE/Line.exe > /dev/null 2>&1 file /usr/bin/line2 ...
2
votes
2answers
220 views

installing a script in $PATH

I am trying to use yeoman in Ubuntu. Everything is installed correctly but I can't use the command yo from bash. If I navigate to the appropriate directory and run node cli.js everything works from ...
2
votes
1answer
2k views

After install Google Chrome in EC2 won't open from Ubuntu Server 14.04 LTS (HVM) command line [duplicate]

I have installed Google Chrome with following command line: $ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - $ sudo sh -c 'echo "deb ...
0
votes
4answers
4k views

How to use Ffmpeg to convert wma to mp3 recursively, importing from txt file?

I tried different options from forums, but most of them are out of date (ffmpeg tells me about it, like with -sameq option). Im trying to understand the docs, but I can't. I want to know how to ...
0
votes
2answers
2k views

terminal ls command not showing all files

I'm familiarizing myself with the terminal, and trying to use the ls command is the directory /usr/bin. Unfortunately, it doesn't show me everything in the folder, the terminal cuts it off. How ...
1
vote
1answer
175 views

Changes to $PATH won't save after closing the terminal session [duplicate]

I downloaded the latest version of Scala and saved it to /opt folder. Then I tried to add /opt/scala-2.11.2/bin to the PATH in order to have easier access to commands like scala and scalac. After ...
3
votes
2answers
135 views

How can I batch replace one string at start of filename with string from end of filename?

I am looking for a command that I can use with Kubuntu's terminal (Konsole). (Edit) I figured out how to remove the useless last 13 characters in the filename, so what would the script be if I want ...
1
vote
2answers
369 views

Linux : Data extraction from text file

I have a text file in which thousands of data is there. eg. id=row_value profile=row_value name=row_value email=row_value address=row_value id=row_value2 profile=row_value2 name=row_value2 ...
2
votes
1answer
102 views

Use solarized or similar in Ubuntu Server

It's possible to use Solarized color scheme (or similar) in a Ubuntu Server 14.04 CLI only?
0
votes
1answer
1k views

What causes “bash: /bin: Is a directory” every time a terminal is opened? [closed]

This is initial screen I am getting on Ubuntu 12.04, when I open a terminal (Ctrl+Alt+T): That is, the text on the terminal is: bash: /bin: Is a directory chase@chase-desktop:~$ gedit ~/.bashrc ...
0
votes
2answers
130 views

How to get rid of terminal window when application was launched from command line?

I am running an application which is lying in /usr/bin/Application/bin/myApp. To run this file I need to execute ./Application/bin/myApp in terminal window. Now on running this way a terminal window ...
1
vote
1answer
324 views

When booting, grub errors and goes directly into CLI

When I boot up, grub loads, but fires off an error about 6 or 7 times: error: failure reading sector 0xfc from 'hd1'. And repeat with other sectors. The problem is obvious, I don't have an hd1, ...
0
votes
2answers
325 views

Connecting to the internet and installing MATE via terminal

So, I installed Ubuntu 14.04 today, and everytime I log in in the GUI (Unity), my PC crashes. This also happened when I tried Ubuntu 13.10 last year, so I figured, it must be my graphics card. I have ...
4
votes
2answers
229 views

Shell gives no prompt if auto completion is enabled (blinking cursor instead)

I tryed to enable shell autocompletion uncommenting the following lines in my .bashrc: # enable programmable completion features (you don't need to enable # this, if it's already enabled in ...
1
vote
0answers
978 views

SSH connection failing since I changed server port number

Yesterday I changed the default ports on the server from 22 to 1993 then restarted but now I can't connect at all. I used ssh -i keyname.pem ubuntu@remotehost to connect then sudo vi ...
1
vote
2answers
3k views

bash: ./configure: No such file or directory while installing FFMPEG

I am trying to install FFMPEG in Ubuntu 14.04. I got help to install FFMPEG installation In meanwhile I got an error `bash: ./configure: No such file or directory` I am getting this error when I ...
0
votes
0answers
282 views

A qdbus command error

Why do I get an error with this command in KDE: qdbus org.kde.klipper /klipper getClipboardContents qdbus: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qdbus': No such file or directory ?
0
votes
0answers
92 views

How To Unzip Call_of_Duty_MW2.zip File

I have Call_of_Duty_MW2.zip and I want to install it with PlayOnLinux, but i could not find a way to unzip it. First, I tried extracting Call_of_Duty_MW2.zip, but it always gave me the same error: "An ...
1
vote
1answer
29 views

Can I change actions upon inactivity and timeout for that from command line?

How do I set the policy about what action should be taken if the computer is inactive for some time. This can be easily done from GUI, via Power Manager. I am trying to do this from command line. I ...
0
votes
0answers
82 views

I can't do updates, the manager won't show

Here's a screencap, it's been stuck like that since I last updated 8 days ago. What should I do, reinstall the update manager, or something in the terminal? I'd like at least to make it work again. ...
-1
votes
1answer
15 views

Switching to Terminal-only fails

I attempt to switch to terminal-only using sudo service stop lightdm and this turns off the GUI, but I can't type in any commands, although there is a cursor that shows up. I'm not sure what's ...
1
vote
1answer
237 views

What is dummy filesystem?

I tried df --help command to generate the man-page for help on df command and I am stucked with a unknown term Dummy filesystem This line in df manpage is where I get to know the term first time -a, ...
3
votes
1answer
49 views

Concatenate single common PDF to directory of PDF files

I use PDFtk, and the PDF Chain gui. Despite reading the man page and investing time in a variety of web searches, I can't find the answer to this one - I have a directory of PDF files, and I want to ...
1
vote
1answer
192 views

Can I use a Bash variable in a sed command?

I'm trying to execute a sed command with "-n" option. for i in 1 2 3 4 5 ; do maas maas nodes list | grep hostname | cut -d\" -f4 | sed -n '$ip'; done I want it to run sed -n '1p' then sed -n '2p' ...