The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

7
votes
2answers
547 views

What does “are you root?” mean?

This is what I keep getting: ascendermedia@magic2tower:~$ sudo apt-get install flashplugin-installer bash: sudo: command not found ascendermedia@magic2tower:~$ ascendermedia@magic2tower:~$ sudo ...
0
votes
0answers
16 views

Copy directory on destination machine during .deb installation in Ubuntu 14.04, 64 bit

I just want to copy directory (which contains some files) on destination machine during .deb installation at path /opt/myProjectName in Ubuntu 14.04, 64 bit. I am successfully able to install files ...
1
vote
0answers
14 views

Accessing root files on Ubuntu Phone from my eOS based on Ubuntu

I'm wondering if its possible to access the root files on my Ubuntu Phone E5 from my computer. I know I can access them from the terminal on the phone but its not ideal using that touchscreen to ...
7
votes
4answers
262 views

How to grep-inverse-match and exclude “before” and “after” lines

Consider a text file with the following entries: aaa bbb ccc ddd eee fff ggg hhh iii Given a pattern (e.g. fff), I would like to grep the file above to get in the output: all_lines except ...
0
votes
1answer
24 views

How to kill only current process and continue with shell pipe-line?

I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from ...
0
votes
0answers
15 views

How to make a background service to capture commands and their output?

Is there anyway to make a background service capture all the commands executed by a user and also save the output in a text file?
3
votes
1answer
31 views

Background color whitespace when end of the terminal reached

I am working with control sequences for text formatting and have stumbled upon some unexpected behavior. I have some text to output, in the middle of this text there is some smaller text block ...
1
vote
1answer
56 views

How to get last N commands from history?

I want to see what are the last N commands in my history. I thought history | tail -n 5 would make it, but I noticed that a multiline command counts for as many lines as it has. $ echo "hello how are ...
1
vote
1answer
50 views

What does blkid stand for?

What does the command blkid stand for? I want a way to remember it. Also, what is it often used for?
6
votes
4answers
809 views

Add a newline into a filename with `mv`

It's a serious question. I test some awk scripts and I need files with a newline in their names. Is it possible to add a newline into a filename with mv? I now, I can do this with touch: touch ...
2
votes
1answer
44 views

How to save a file from an initramfs emergency shell?

I can't boot because of some strange error. There is an error report file generated for me, to supposedly submit it along with a bug report, or whatever. So to help me figure out what the problem is, ...
-1
votes
2answers
34 views

Need advice fixing this source error in Kali Linux

W: GPG error: http://http.kali `enter code here`.org kali Release: The following signatures were invalid: BADSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org> *This is the result i ...
1
vote
1answer
33 views

Using apropos command with -a to search multiple keywords on CentOS 7

I'm running CentOS 7.0 build 1503. I'm trying to search for commands I don't know the name of by searching the man descriptions for multiple keywords using AND (e.g. search for a command containing ...
4
votes
4answers
167 views

How can I convert two-valued text data to binary (bit-representation)

I have a text file with two (2) only possible characters (and maybe new lines \n). Example: ABBBAAAABBBBBABBABBBABBB (Size 24 bytes) How can I convert this to a binary file, meaning a bit ...
1
vote
0answers
40 views

osx - dd command behaving weirdly [duplicate]

I've been using dd for a couple of years now, most of the time successfully. I usually use it to dd Linux images to USB drives. My workflow doing so is as such: convert .iso image to a .img format ...
1
vote
2answers
36 views

Extract lines from a file using vim or teminal

I have the following in a file. I'd like to use Vim or terminal to extract title and its content like this. How can I achieve this? Topic 1 - Core: Algebra 1.1 Arithmetic sequences and series; sum ...
-3
votes
0answers
37 views

How to save output of a python command to a file [closed]

I am writing a script and part of it is print "\nSOURCE CODE COMMAND: "+source_code_command print "\n" exec source_code_command outfile > output.txt Third line is throwing error. While ...
0
votes
0answers
20 views

how to hardsubbed avi files with Hnadbrake CLI bash script

is there a way to hardsubbed avi files with Handbrake CLI ? i use this bash script below to convert all avi files in a directory but have no idea how to make hardsubbed video with this bash script. ...
0
votes
1answer
33 views

Open a webpage and enter a username and password via CLI

Ultimately, I want to use a bash script to automatically open and log into a website. I was wondering if I could use the curl or elinks commands to log in to a website and then somehow export that ...
-2
votes
1answer
22 views

Get CIDR of my IP on the WAN

I have a script that updates some remote systems with my laptop's IP and CIDR on the WAN, how the Internet sees me, in other words. I use the following to get my IP on the WAN in bash: dig +short ...
0
votes
0answers
13 views

Download Hotlinked Images from Forum from Command Line

From the command line, is it possible to download linked images posted on forums? I want to enter the forum thread url and maybe stipulate which image hosts to detect. Also some threads will have ...
11
votes
8answers
2k views

What to use when the “ls” command doesn't work?

I tried to use the ls command and got an error: bash: /bin/ls: cannot execute binary file What can I use instead of this command?
1
vote
2answers
143 views

Another awk(ward) question - mapping substrings with multi-keys

I have two files that look like this: mapping.txt: 100178 L08/2015 100180 L08/2015 103822 J03/2012 103823 A06/2012 103823 J02/2012 103823 J03/2012 ... input.txt: 100180011|225| ...
0
votes
3answers
22 views

how to show port numbers that are listening for the incoming connections under TCPv4?

I want to use command line to show only the port numbers after ":" only This is what I'm trying to do sudo netstat -ant |grep LISTEN|grep :|sort -n|cut -c 45- It shouldn't list any tcp6 info
6
votes
2answers
80 views

Why does the terminal echo keystrokes when commands are running?

I was recently running tail -f on a log file of a server that was running, trying to diagnose a bug, when I accidentally bumped the keyboard and typed some characters. They got mixed in with the ...
-2
votes
0answers
28 views

Chmod 777 in Windows 7 [migrated]

I use Window 7 and i need to create a new .dat file in the principale partition C:. But i can't do that because i don't have all the permissions. I run the cmd as administrator and i try again but ...
0
votes
1answer
20 views

Set the active tmux tab color

Is it possible to change the background of the active (current) tmux tab? I'm using tmux 1.9 on Ubuntu 15.04. $ tmux -V tmux 1.9 I tried to do: set-option -g pane-active-border-fg red But the ...
0
votes
0answers
31 views

How must (Not how can) a program be available from everywhere in CentOS/Fedora

I was reading this link from MySQL: https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-install-linux-binary.html shell> cp support-files/mysql.server /etc/rc.d/init.d/ shell> chmod +x ...
-1
votes
1answer
45 views

How to recover the deleted file from linux system? [duplicate]

I am using centos7 locally. Mistaken I deleted text file(keystone.conf.disabled) using rm, from /etc/httpd/conf.d directory, How to recover this file. This file is very important to me. Please help ...
2
votes
2answers
27 views

In find -perm, what's the difference between “+6000” and “/6000”?

I'm trying to find all the setuid/setgid binaries on my system. I've found two different ways to do this online. What's the difference between find / -perm +6000 -type f and find / -perm /6000 ...
1
vote
1answer
16 views

Bad ID3 tags when transfering mp3 to another device

I created mp3 files in Linux with mp3wrap application and then I applied ID3 tags on it as follows $ for i in *.mp3; do mp3info -t ${i%.*} -l yes1 -a yes $i; done When I look at particular mp3 file ...
0
votes
1answer
49 views

Describe the prompt I see when I first logged into the Linux computer

Can you please describe and explain each part of the command prompt pi@raspberrypi ~ $ This is what I saw when I first logged in to my Linux computer.
0
votes
0answers
30 views

What is the difference between “. ./command” and just “./command”? [duplicate]

I know that you do "./command" to signify to look in the current folder for the name of the executable . . . but why do you need to do "dot space dot slash command" sometimes? Like, when you are ...
2
votes
2answers
40 views

How can I shuffle pages from a pdf file in a random order?

I would like to shuffle the pages of a pdf document in a random order. How can this be done?
0
votes
2answers
39 views

How do I add Metasploit into my PATH variable?

I have Metasploit installed on my Mac in /usr/local/share/msf. Everytime I want to use it I have to cd into that directory and use msfconsole. If I try to /usr/local/share/msf/msfconsole in my home ...
1
vote
1answer
54 views

How to write data one by one from tmp files to the final output file using for loop?

I have two tmp files named tmp1 and tmp2 which contains some lines. tmp1 file, 1c\ datafile no. 23 2c\ datafile is ok tmp2 file, 3c\ datafile no. 24 4c\ datafile is ok I have a ...
-3
votes
1answer
67 views

What command would I issue in order to complete this question?

So I have tried over 10 different attempts and I'm just stumped Here are two inverted-tree diagrams. Issue a command to change the left diagram to the right diagram. Assume that you are in your home ...
1
vote
1answer
44 views

Running a program and providing input

I have a program that runs from the command line. As soon as it runs, it asks for a text value and expects the return key to be pressed after that. Is that possible to create a bash script that runs ...
1
vote
0answers
17 views

Disable the Gnome screensaver from the command line

I would like to disable the screensaver on Centos 6.2 for a single user. I have tried from the GUI, that looked like the easiest way, but it didn't work out, I am not sure why. I am looking for an ...
0
votes
1answer
28 views

How to capture the output of the strings command? [duplicate]

How do I capture the output of the strings command into a .txt file from the command line?
0
votes
2answers
47 views

Count frequency of specific numbers in a text file of scientific notations

Background I have a text file, named blood_conc.txt as shown: 0, 0, 0, 0, 0, 0, 0, 1.32006590271e-05, 1.990014992001e-05, 1.504668143682e-05, 2.176900659261e-06, 7.673488970859e-06, ...
1
vote
1answer
27 views

Sorting in reverse numeric order on subfield in a multi-field sort

I'm trying to use GNU sort on a directory/file listing, eg (subset of much longer listing): exams2008/Zoology/Summer/ZY4019Sum08.pdf exams2009/Zoology/Summer/ZY4019.pdf ...
-2
votes
1answer
26 views

Copying all same files to one location and changing the file name to subdirectory_filename

I have conf.yml files in different folders as below. /var/loyalty-badge/conf/conf.yml /var/loyalty-level/conf/conf.yml /var/promotion/conf/conf.yml /var/featured/conf/conf.yml Now I want all the ...
2
votes
2answers
56 views

What is the technical term for command line application environment programs?

Some programs that are run in the terminal, after calling them, switch the command line to their own environment, like "R" (statistical program language) or "GHCi" (interactive Haskell). What is ...
2
votes
1answer
51 views

Is it possible to track bash commands in real time?

I'd like to know if I can track commands entered by user in a bash shell, in real time. What I'm trying to do is something similar to thefuck, but I need to prompt the user as and when he enters new ...
1
vote
0answers
30 views

Replace a image in a PDF using command line

I need to process some PDF files. The task consists in exchange a given image file by another. My first problem is how to replace a PDF image from command line in a batch process. Next I'll try to ...
10
votes
2answers
581 views

Open a .raw file as text in less

The output of my program has a .raw file extension. If I try to open this with less I get: No isoinfo available Install mkisofs to view ISO images The file isn't an image file, it's just text. Is ...
0
votes
2answers
41 views

sponge from moreutils - what's the difference to shell redirect? useful examples?

> brew install moreutils ==> Downloading https://homebrew.bintray.com/bottles/moreutils-0.55.yosemite.bottle.tar.gz ...
0
votes
0answers
30 views

How can I update or upgrade BOSS Linux by terminal?

I use EduBOSS Linux 3.0. Since installation I still not update my OS. But I want to solve some Audio, Video and Graphics problems. To solve that problems I want update my BOSS Linux. How can I ...
0
votes
2answers
46 views

What are the steps of this command using ; || and && [duplicate]

Note: A B C are commands..... Please tell me what the step process would be of these commands, so I can better understand the language.. A || B ; C = If A fails then run B then C? A ; B || C = Run A ...