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

learn more… | top users | synonyms (1)

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
40 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 ...
0
votes
1answer
76 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
54 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
33 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 ...
13
votes
7answers
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
153 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
27 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
120 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 ...
0
votes
1answer
45 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
1answer
53 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
148 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
37 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
26 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
93 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
72 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
63 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
73 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
46 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
42 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
47 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?
1
vote
2answers
69 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
37 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
27 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
59 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
69 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
54 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
626 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
84 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
39 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
50 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 ...
1
vote
0answers
26 views

List partition type GUID's for all disks from command line?

I need to list the partition type GUID's from the command line. Note: This is not the same as the partition UUID. Basically I'm needing to search for all disks that have the Ceph OSD type GUID: ...
-7
votes
1answer
51 views

Find Command: display the file numbers [closed]

I have a couple of questions about the find command. How to show how many files and directories(only the result numbers) within the /var directory (and below) are owned by someone other than you or ...
1
vote
2answers
75 views

What does -ar flag mean for cp?

What does -ar flag mean here: cp -ar ../foo/bar/. qux/quux/ I'm quite new to command line languages and trying my best to learn it. Not sure of the -ar flag only. -r is recursive right, then can ...
0
votes
1answer
59 views

Are cp -r and cp -R the same? [duplicate]

A tutorial shows cp -r http://cli.learncodethehardway.org/book/ex10.html but http://ss64.com/osx/ only shows -R.
2
votes
1answer
115 views

Using mailx without storing a password

I'm trying to setup mailx to use my Gmail account. I've found a configuration that can send mail successfully but it requires me to store my email password in a configuration file in my home ...
4
votes
1answer
43 views

Spelling mistakes in the file?

I have a file with spelling mistakes in it. It has a lot of mistakes I need to find all mistakes and correct them. I used : spell [filename] it shows me spelling mistakes thiis iz wurse ... and ...
2
votes
2answers
64 views

Why does my ls --help not work?

Marias-MacBook-Air:~ marias$ ls --help ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
0
votes
4answers
68 views

Why does my “ls -a-l /home” not work?

Marias-MacBook-Air:~ mariasharapova$ ls -a /home . .. Marias-MacBook-Air:~ mariasharapova$ ls -a-1 /home ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...] ...
4
votes
2answers
115 views

Mac OS X how to verify particular packages are installed

In a BASH script I need to check if gcc, g++, cpp, make, libpng devel, zlib devel, git, Java (including devel files), ant and pkg-config are available on Mac OS X and if not, I need to prompt user to ...
3
votes
2answers
188 views

change file size format when using stat

The formatting character %s makes stat print the filesize in bytes # stat -c'%A %h %U %G %s %n' /bin/foo -rw-r--r-- 1 root root 45112 /bin/foo ls can be configured to print the byte size number ...
0
votes
2answers
84 views

Using the terminal, what other ways can you delete a file?

Other than rm, what alternative methods will achieve the same result? For example, moving a file to "trash" and securely emptying the trash bin. Or moving the file to /dev/null
1
vote
1answer
72 views

How to let openssl respond to http/s get directly from command line while listenning

How can I let the openssl s_server to reply to every http(s) request directly from the command line or the server it self (the server is using centOS)? is that possible? from the -help command for ...
5
votes
7answers
336 views

Is there an equivalent way to remember directories on mounted volumes like DOS

A while ago, I moved from a purely Windows environment to using Windows and a Mac. Whilst I am slowly getting used to my Mac and loving it, there are a few things that frustrate me. One of them is ...
2
votes
2answers
860 views

Installing VBox Guest Additions when there is no X-server

I'm using Virtual Box on my windows 8.1 host machine. I have installed CentOS & Ubuntu in 'Graphical Mode' and had sufficient practice. But now I wanted to switch to 'Command Line Mode" ...
1
vote
0answers
74 views

Manual creation of NetworkManager connection file fails (Error: Unknown connection)

Objective: I am trying to set up a 3G connection using NetworkManager 0.9.4 via command line. I have previously succeeded (see this question) by setting up the connection through the nm-applet (GUI in ...
0
votes
1answer
95 views

Sending files over Samba with command line

I was wondering if there is a way to use Samba to send items to a client machine via the command line (I need to send the files from the Samba server). I know I could always use scp but first I was ...
0
votes
0answers
112 views

nmcli connection activation failed

I was able to create a wifi hotspot on my debian 8 install using network tab under gnome settings. I was trying to do the same using nmcli but it always shows $nmcli con up id Hotspot Error: ...