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

learn more… | top users | synonyms (5)

1
vote
1answer
96 views

Difference between 'grep' in Ubuntu and Kali Linux?

I always used the following command to filter out my contacts email addresses from a directory in Kali Linux: grep -rIhEo "\b[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+\b" >> 1A I tried ...
-1
votes
3answers
43 views

Open the first (or any) file from command line

Suppose I'm browsing a directory from command line with lots of files with long names. Is there a easy/fast way to open the first file from the directory, or simply any of these files? In my case they ...
3
votes
1answer
33 views

Append current timestamp on files name from background running command

Following is command that I have used in bash script and it is run on background: sshpass -p prakash12 ssh -t -p $1 prakash@localhost './test_new_update_script.sh > ...
4
votes
2answers
270 views

'tail' command not getting only the new lines

I'm using the command: tail -f -n 0 file.txt But it keeps repeating itself. What I'm doing is the following: Create the file in the first terminal: touch file.txt Start the tail in the second ...
0
votes
2answers
24 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
19
votes
4answers
17k views

What is terminal command that can show OpenGL version?

So I want to find out which is my OpenGL version. I have access to Ubuntu via SSH. Which command shall I execute?
1
vote
2answers
18 views

Bash/zsh: Undo erase backwards (ctrl+w)

In Bash and Zsh ctrl+w erases backwards from where the cursor is. Is it also possible to undo what I had erased? Thanks!
0
votes
1answer
2k views

No such file or directory problem

Im using 32bit version of ubuntu and the terminal seems to not detect any directory... any command im trying to use to the folder or a file ends with that error. The command im trying to use is: ...
2
votes
3answers
227 views

Hide debug information when running apps from the command line [closed]

Most of the time running a gtk application from the command line it starts dumping debug information to the stdout even though I put them in background. Example: ~$ gedit test.html # and ctrl+z to ...
1
vote
6answers
1k views

display file properties via terminal

what is the command line that displays file infos (or properties ) such as in GUI method UPDATE i knew that ls -l shows properties , however , my question is very clear ; such as in GUI method . ...
1
vote
1answer
39 views

how to go to a directory in gnome terminal which contains spaces as its name? [duplicate]

I tried to md5sum a image but the path is long, and there is no option in the file manager to open that path in gnome-terminal. Like right-click-> open current directory in terminal like it used to be ...
10
votes
3answers
5k views

Open terminal in nautilus

Is there any stable open terminal plugin for nautilus?
49
votes
9answers
21k views

How can I set default terminal used in Unity?

How can I set the default terminal used in Unity? I would like to use the Ctrl+Alt+T hotkey to start a non-default terminal. The default terminal is gnome-terminal. Where can I change the default ...
1
vote
1answer
42 views

How to get sub-string for a string using pattern analysis?

I want to get sub-string of any string using pattern analysis. Example String: <string module name="Jai" fathername="S.S. Khan" phone="1234"> <address complete="startz us" /> ...
1
vote
1answer
80 views

Why doesn't this bash script execute on Ubuntu, but does on an online environment?

I can't figure out why this does not work properly on Ubuntu. It works great when I execute the script on CompileOnline; but when I run it on a local server it does not give me the main menu and skips ...
2
votes
1answer
28 views

Manual time syncing

Is there a command or some option in KDE environment with which I can manually sync system's time and date with a time server (eg Public Time Server (pool.ntp.org))?
33
votes
4answers
37k views

Running programs in the background from terminal

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a ...
55
votes
8answers
43k views

Progress and speed with 'cp'?

When copying files using cp, is it possible to display the progress and speed of the transfer? Otherwise, is there any alternative command line utility that can achieve this?
2
votes
3answers
57 views

Get absolute path of files using 'find' command

Is there a way to get absolute path of a file that is being searched? For example: find .. -name "filename" It gives me results like ../filename but I want the full path. What I need is to find ...
0
votes
1answer
15 views

How to use guake at right side monitor in dual display environment

I want to use Guake at right monitor. So I added this ppa by sudo add-apt-repository ppa:cberner/guake, and sudo apt-get update. ...
40
votes
8answers
35k views

Torrent client for the command-line?

Yesterday one of my friends asked me, if there is some torrent client, that runs on the command-line. I have no answer for him, but I think that you have it.
0
votes
2answers
68 views

export $PATH not working correctly on Ubuntu 13.10

I have connected to remote Linux desktop (Ubuntu 13.10) using ssh command and try to run following command on remote desktop. On my host machine I am using Ubuntu 12.04. On remote desktop: I have ...
1
vote
1answer
29 views

zip I/O error: Protocol error in bash script

so here's the script that i am trying to get it work: #!/bin/bash filePath="$1" fileName="$( basename "$filePath" )" backupDir="/my/backup/dir/${fileName}-backups/" dateTime=$( date ...
0
votes
1answer
49 views

Ubuntu 12.04 boots to command line after upgrade

Today package manager suggested the usual updates and I installed everything. After it prompted for reboot, Ubuntu restarted in command line mode. Not sure what to do here. By browsing the forum it ...
1
vote
2answers
35 views

Get full path of currently open files

I'm trying to code a simple application that must read all currently open files within a certain directory. More specificly, I want to get a list of files open anywhere inside my Documents folder, but ...
1
vote
0answers
18 views

log history of sftp [closed]

The /var/log/auth.log does not seem to contain what commands an user used after an sftp connection. Do anyone know where to find the commands issued after an sftp connection? One of my computers was ...
0
votes
2answers
57 views

How to edit a specific line of textfile in terminal with a script?

I need to change a .config text file every time the program doesn't work as I want it to. I want to be able to do it in terminal preferably with an alias and with the following logic: alias ...
37
votes
4answers
8k views

How do you mute from the command line?

How do you mute the sound system from the command line?
0
votes
2answers
47 views

how system knows to run files in bin directory

I know there are /bin, /sbin, /usr/bin, /usr/local/bin and ..., which If put my file on that I can run that in terminal. My question is this how terminal knows to look at these paths? may be you say ...
6
votes
1answer
987 views

How to configure pkexec?

Reading these questions and answers: When to use pkexec vs. gksu/gksudo? Why is gksu no longer installed by default? brought me another one that will create problems for new users of that ...
0
votes
1answer
73 views

Can someone explain the working of this bash script?

I found the following bash script which I would like to run, but I am not completely sure about what it is going to do. Can someone explain the working of the following bash script; i.e. what is it ...
2
votes
2answers
72 views

How do I copy same files with a particular extension to another directory in terminal

I want to copy all my .png file to particular directory by using: cp ...../*.png $pwd but it seemed not working.
8
votes
7answers
3k views

how to shift applications from workspace 1 to 2 using command

Is there any way I can switch the application running in one workspace to another on command line? I use Ubuntu 10.04 UPDATE1 As per suggestions below wmctrl -l 0x02200003 -1 bond Bottom ...
1
vote
1answer
822 views

Won't execute terminal commands

I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code ...
2
votes
1answer
27 views

How to display screen by screen in terminal

I am searching some files in terminal but the files is too long, how can I view them screen by screen.
0
votes
1answer
25 views

How to edit displayed bash name [duplicate]

I've done some googling, and looking around this stack overflow, but this one seems to elude me. How might I reduce/edit the displayed bash name on the terminal prompt? I.E. This: ...
35
votes
10answers
22k views

A command-line clipboard copy and paste utility?

In Windows I used command-line clipboard copy-and-paste utilities... pclip.exe and gclip.exe These were UnixUtils ports for Windows (but they only handled plain text). There were a couple of ...
0
votes
0answers
33 views

Run multiple scripts using one script on boot?

I need help. I've tried several methods to get this to work. Basically, I home host a server on my PC, the problem is, I want it to be online when logged in as every user on the computer. It uses ...
3
votes
2answers
255 views

Add strings to a file with commands

I need to add: user_xattr,acl,barrier=1 to my /etc/fstab file. Is there a way to do this via the via shell script? I only want to edit the '/' mount. Here is what I have before I manually edit ...
7
votes
2answers
4k views

Shell does not show typed in commands, “reset” works, but what happened?

My problem is that the Bash shell stops showing the characters I type into it. It does read the commands though. I've come across this problem quite a few times and I don't understand what causes it. ...
11
votes
2answers
307 views

How do I reset the colors of my terminal?

Help! Somehow my terminal looks like this: It's nearly impossible to read the text. How can I fix it without exiting the terminal?
-1
votes
1answer
35 views

Environment Variables and .bashrc [closed]

I need Help in this: that is how to do this Edit the setting file of the user. In our case it should be in the root directory of the user and the name is .bashrc or .bash_profile 2.- Add the ...
2
votes
1answer
47 views

What commands show pending/scheduled tasks in Terminal?

What commands can I use in Terminal to see pending or scheduled tasks for today or tomorrow. For example how can I detect pending system shutdown?
26
votes
6answers
42k views

Browsing the internet from the command line

How can I browse the internet from the command line in Maverick?
0
votes
1answer
81 views

Can't Execvp “ No such File or Directory ” Error in geany Editor

I am getting this error in Geany Editor while executing a simple program: Can't Execvp " No such File or Directory " I want to set xterm as Geany Terminal Emulator. But I think I've accidentally ...
0
votes
0answers
24 views

SD Card only recognized if mounted during boot

I have a bug with my SD-Card reader on my laptop*. My computer doesn't recognize/see a SD-Card when mounted. I found out though that I can make it read it if I boot with the SD-Card inserted. If I do ...
1
vote
3answers
68 views

manipulate files with wildcard characters in filename

I just discovered that I can actually created a file named *.txt in Ubuntu. Suppose I have a.txt b.txt and *.txt in my current directory. How can I delete the third one using terminal? (rm *.txt ...
2
votes
1answer
21 views

Substituting values on the command line

I want to run sql from the command line: mysql -u user -p database -e "INSERT INTO table VALUES ( NULL, [hash] , NOW(), 0); I want to replace [hash] with the response of another command line ...
12
votes
6answers
5k views

How can I recursively delete all files of a specific extension in the current directory?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now ...
3
votes
1answer
45 views

How to automatically set terminal title to directory name without path

Currently, my bash terminal/tab title is set based on the directory I'm in. For example: bob@bobscomputer:~/i/had/some/great/pie/yesterday This isn't very useful if I have multiple tabs open ...