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

learn more… | top users | synonyms (6)

3
votes
4answers
171 views

Find and replacement of the numerical part of a particular string with increased value using terminal command [duplicate]

The inputfile is, test00.dat test07.dat test03.dat aram22.dat test09.dat aram09.dat test13.dat I need the output file as test01.dat test08.dat test04.dat aram22.dat test10.dat aram09.dat test14....
0
votes
2answers
207 views

Navigate the web with the terminal

I'm trying to learn how to use the terminal, and I want to try sending and receiving data from a common website like Amazon or Google. I want the terminal to enter a string into a website's search ...
-7
votes
2answers
131 views

How can I move all non-hidden .jpeg files using shell expansion characters?

Here is my problem: Move all non-hidden files with names ending with .jpg (regardless of case - .jpg, .JPG, .JpG etc.) from your present working directory into /tmp. Use shell expansion ...
1
vote
3answers
340 views

Batch rename, add extra “.” character at position 3 in filename, recursively

I've been struggling to make this work but I am not very good with regex. This is what I tried to do and it didn't work (after 50 minutes, still going on with no visible change): while IFS= read -r -...
10
votes
5answers
1k views

Launch nautilus in location navigated to in Terminal [duplicate]

I find it rather hard to travel through my system using nautilus and much prefer using the cd etc commands in Terminal to get around my system, but I find that sometimes I do need to look at a list of ...
0
votes
0answers
56 views

Use terminal to run programs scripts a short and practice way [duplicate]

in window I know make this withe the cmd but in ubuntu it's not good I have a question about the Terminal. I want to ask how to call a program in the terminal $ /home/yvanmoses/Dropbox/...
1
vote
2answers
631 views

Ubuntu 14.04 : Cannot access internet via terminal

I am able to connect to both wired and wireless networks and able to browse via a browser. So I don't think there's any network issue. However I cannot run any internet based command from my terminal ...
1
vote
1answer
389 views

How can I get the number of hardware level threads in my computer?

How can I get the number of hardware level threads in my computer using the ubuntu terminal?
2
votes
1answer
2k views

Arduino 1.6.1 installation

I unpacked the Arduino archive. I have jdk, jre installed properly. When I am trying to launch Arduino 1.6.1 IDE I get the following error and I have no idea where to start from to solve it. Any ...
0
votes
1answer
28 views

Bootable partition

I usually create a bootable live image of a CD on USB devices with this command: sudo dd if=image.iso of=/dev/sdx The problem is that after using this command, I cannot copy additional files on the ...
0
votes
3answers
1k views

Can't Access Terminal, Menus or Sidebar

I posted a while ago with this problem: 14.10 Upgrade: No access to menus or sidebar, which I cannot find a workaround, especially as I can't access the Terminal via Ctrl Alt T, and none of the login/...
0
votes
1answer
194 views

Packaging bash script with dh-make

I have installed dh-make by installing other packages as recommended by this page which depend on it (I am listing all packages which could have installed it as well because I am not certain which one ...
1
vote
0answers
17 views

Trying to scroll in terminal produces : 64;65;15M65;65;15M65 output instead

When I am trying to scroll up and down in my ubuntu 14.04, my shell outputs this instead of scrolling: 64;38;17M64;38;17M64;38;17M64;38;17M64;38;17M What is going on? How do I fix this?
1
vote
3answers
3k views

Where is the terminal in Ubuntu Phone?

Just got the BQ and things are good. I just can't find the terminal. Does anyone know how to start it?
0
votes
2answers
210 views

How to use 'cut' command for finding temperature using tlp?

I have installed tlp in my system to prevent laptop over heating and i used this code to retrieve currtent cpu temperature. tlp-stat -t the output for above command is something like this: --- ...
1
vote
0answers
51 views

Ctrl+L on terminal doesn't work anymore

Usually on the command line you could write Ctrl+L and this would clean the command line, but now it doesn't. The command does nothing at all. How can I restore it to the way it was? I'm using Ubuntu ...
3
votes
2answers
2k views

ubuntu machine had postgresql folder blown away manually - can't install or remove any packages

i have a machine where a user deleted their postgresql folder from the command line in an attempt to uninstall postgres. now when we try to install any other packages - even unrelated ones - we keep ...
0
votes
1answer
150 views

How to search ASCII text with Ubuntu Terminal

I have a file in which when I use the file myFile I get returned myFile: ASCII text, with very long lines I then proceeded to open it up as a .txt file and it opens up in notepad as a lot of ip ...
0
votes
2answers
172 views

Problem mounting my external hard disk

I'm unable to access any data from my external hard disk, because I can't mount it. namrata@fighter:~$ lsusb Bus 001 Device 003: ID 125f:a31a A-DATA Technology Co., Ltd. Bus 001 Device 001: ID 1d6b:...
0
votes
1answer
159 views

Error when i do ''make'' in cado-nfs map

When I’m in terminal and in the map cado-nfs. Then I do make. It will run for a second or two and then I gives a stops and gives this error: CMake Error at config/python.cmake:32 (message): Did ...
4
votes
2answers
583 views

Command Line - Move here [duplicate]

I would like to move a file via the terminal using the mv command. The syntax is mv file_old_dir file_new_dir I am already in the directory where I want the file moved. I just did mv file_old_dir ...
1
vote
1answer
112 views

Command-line perl regex replacement: replacement string contains utf8

Say you have a file named test.txt with the following lines: ಕದಂ.ಬ कदम्ब. Then, suppose you want to replace each dot following a devanagarI unicode character (ie in कदम्ब) with a ।. Then, you might ...
3
votes
3answers
3k views

Can I call a .cpp program in Bash?

I am new in Bash programming. I want to call my C++ program in Bash file. My program is myProg.cpp: #include<iostream> using namespace std; int main() { cout<<"Salam! World"<<...
1
vote
3answers
453 views

How to see users in alphabetical order?

I want to know how to see the users by alphabetical order when using this command: cut -d: -f1 /etc/passwd I get a list with a lot of names including mine but it's very long. I want to order it ...
1
vote
2answers
323 views

Is there a command to round decimal numbers in txt files?

I saw this post, but I was wondering if there is a simpler command to round decimal numbers. I have a file with milions of numbers: 0.1 1.2 3.8 I want to round them to integer 0 1 4 Is there a ...
1
vote
1answer
121 views

How to print an octal value's corresponding UTF-8 character in bash?

I expected printf %s '\<octal_character_value>' to do the trick, but it doesn't: printf %s '\101' Outputs: \101
2
votes
3answers
646 views

Multiple File Extension Rename with single command [duplicate]

I received some important files via mail. There are about 150 files like these. The extensions of the files are named as zip1,zip2,zip3, zip_ etc. I just want to change the extension of these files ...
0
votes
2answers
444 views

Open a file at a certain position and read one byte in bash

Since two persons already voted to close this post, I'll try to make the question as clear as possible. A file on a physical device is represented as a binary sequence. That being said, what I need to ...
7
votes
1answer
792 views

What are the differences between executing shell scripts using “source file.sh”, “./file.sh”, “sh file.sh”, “. ./file.sh”?

Have a look at the code: #!/bin/bash read -p "Eneter 1 for UID and 2 for LOGNAME" choice if [ $choice -eq 1 ] then read -p "Enter UID: " uid logname=`cat /etc/passwd | grep $uid | ...
0
votes
3answers
1k views

Linux equivalent for «cmd /C start “Title” “C:\Folder\file.bat”»

I have a Java program that runs a batch file on Windows with Runtime.getRuntime().exec() using the following command: cmd /C start "Title" "C:\Folder\file.bat" The Java program ends quickly since ...
1
vote
1answer
164 views

Find and replace regular expression (matching unicode character class Devanagari) in multiple files

Say you have a file named test.txt with the following lines: ಕದಂಬ कदम्ब Then, suppose you want to replace each devanagarI unicode character (ie in कदम्ब) with a D. Then, you might think that the ...
1
vote
1answer
393 views

Print a list of “full” relative paths of all the files present in a directory and in its sub-directories

I need to print a list of "full" relative paths of all the files present in a directory and in its sub-directories. I used to do this with du and grep: du -a <path_to_directory> | grep -Po '[0-...
4
votes
2answers
156 views

How to keep terminal for installation of debugging symbols of apport's local investigation alive?

apport allows to investigate crashes locally and to either start a gdb session, get a backtrace or install debugging symbols in that local investigation. When choosing the latter a gnome-terminal is ...
0
votes
0answers
37 views

localhost cannot access my newly created folder [duplicate]

I'm using Ubuntu 14.04. I use to copy projects like wordpress and codeigniter and work in them. At the beginning after installing Ubuntu 14.04 I granted all privileges to access the /var/www folder. ...
1
vote
1answer
187 views

.zip file not getting extracted

I have downloaded linux game Urban Terror using flareget download manager which is 1.7 GB. The download seems to be completed without errors but it is not getting opened with archive manager and I get ...
2
votes
0answers
133 views

IpProtocols firefox add-on with gnome-terminal and multiple tabs

I want to use Firefox with IpProtocols 0.2.3 to launch telnet sessions from browser. It is working well for me with xterm terminal emulator, but i wish to use multiple tabs. Now I try to use gnome-...
15
votes
2answers
16k views

Why I can't uncompress a .bz2 file using tar?

So I have this wikipedia dump sized at about 10gb and named as "enwiki-latest-pages-articles.xml.bz2". I have been trying the following commands in the terminal to unzip the dump: tar jxf enwiki-...
-1
votes
2answers
467 views

When I start the computer, it only shows the terminal

When I opened my computer, it shows the terminal interface. I don't know why but I think it's due to the many times I opened te terminal and typed lots of commands to fix my wireless network and ...
0
votes
1answer
81 views

Run a multi-line script in Screen

I want to run this script in a screen: #!/bin/bash while true do java -server -Xms2G -Xmx2G -jar craftbukkit.jar echo "If you want to completely stop the server process now, press Ctrl+C ...
0
votes
1answer
794 views

ssmtp doesn't recognize ctrl+d

I'm trying to send emails from an ubuntu-server (14.04.2 LTS) via the command-line and later inside small scripts. To do so, I want to use ssmtp with an external mailserver, inside the network, that ...
6
votes
2answers
600 views

Total video time in a Directory

Is there a script(bash, python etc.) that outputs the total duration time of all video files in a Directory(recursively) ? For e.g on executing the following : script mypath it gives x minutes/...
3
votes
2answers
549 views

Shortcut to send telnet session to background conflicts with Cisco terminal shortcut: Ctrl+Z.How do I change that?

My Linux machine has no GUI. I use it as a jump box from where I telnet/ssh on my routers to configure The shortcut to send a process to background in Unix is Ctrl+Z On the same time the shortcut to ...
3
votes
1answer
220 views

xfce compose key not working in xfce4-terminal

I configured my compose key in /etc/default/keyboard: ~ $ cat /etc/default/keyboard # Check /usr/share/doc/keyboard-configuration/README.Debian for # documentation on what to do after having ...
1
vote
1answer
179 views

Custom environment with gnome-terminal

I tried to put this into the startup applications: gnome-terminal --working-directory /media/Data/work/ -e '. .env/bin/activate' where .env/bin/activate represents my virtualenv. For some reason, ...
5
votes
1answer
646 views

How to put an image and some text to .doc file via command-line?

I am trying to create a file.doc (Microsoft Word Document format) and write some text into it and also, insert an image into it via command shell. I have no idea what or how should I do it. Any ...
1
vote
1answer
122 views

Format from terminal(ctrl+alt+f1)

24 hours ago I start using for the first time Ubuntu 14.10. I tried to install AMD GPU drivers and then I install from the terminal the fglrx and after a restart I got the The system is running in ...
2
votes
3answers
651 views

UBUNTU 14.04 Right mouse click and paste (shift+ctrl+v or ctrl+v) does not work when pasting on to the terminal. HELP!

I try to copy from the descriptions and paste the code into the terminal but it doesn't work. Even the rightmouse click does not work. Ctrl+V or Ctrl+Shift+V does not work even the right mouse click ...
4
votes
7answers
430 views

Delete files that aren't in a list of patterns

I run a car sales website for a client. They are constantly adding and removing cars. When a new one comes in, they add a batch of images and the website generates a thumbnail for each. The site ...
2
votes
3answers
3k views

Copy and overwrite directory recursively

I have a directory called 'existing_folder' and another directory called 'temp' I want to replace the contents of 'existing_folder' with those of 'temp' along with any sub directories. Because the ...
0
votes
1answer
376 views

awk print output redirection

I am writing a bash script, and in that bash script I have a line similar to this: awk '/TextToBeMatched/ { print; print "TextToInsert"; next }1' "/Path/to/specified/file.extension" And currently ...