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

learn more… | top users | synonyms (1)

0
votes
0answers
111 views

Check OpenSSL version in Android with java runtime or shell command

I have a problem with checking OpenSSL version in Android device. I've tried to: grep OpenSSL from system/lib/libssl.so with java runtime.exec. but it doesn't work? Anyone can help me, how to make a ...
43
votes
4answers
35k views

How to Determine the Amount of RAM Slots In Use?

I forgot how many RAM modules are installed on my laptop. I do not want to unscrew it but want to look it up on the console using bash. How do I gather this information?
0
votes
2answers
428 views

Quick way to delete a line from an extremely large file [duplicate]

I have a 67GB .csv file (I know... I know...) I need to remove the 4,125,878th line from the file as it is corrupt. My CSV parsing tools won't ignore or skip it. I could use sed to do something ...
0
votes
1answer
375 views

Copy all files matching criteria on find command with -exec

Below are my attempts at copying all files except .out and .class files into a subdirectory titled homework21/. Note homework21 is a subdirectory of the folder in which I am working in. me@ice4:~/...
0
votes
4answers
240 views

How do I locate the ISO file on a DVD from the terminal?

A DVD inserted into a CentOS 7 server needs to be used to install CentOS in a virtual machine in the server, but I need the location of the ISO file in order to install it. So how do I locate the ISO ...
0
votes
2answers
71 views

Passing contents of a file on the command line [duplicate]

I'm trying to figure out how I can send arguments (which are contents in a file) on the command line as parameters to a cpp function. I am NOT trying to send it through stdin. I have a function named ...
2
votes
1answer
56 views

String a command after a command that ends in & - EX: nohup > log & && rm log

So I guess there is actually two parts to this question, because I don't want the RM to go untill the nohup command has finished, but the problem is, I love to string together commands, but my nohup ...
1
vote
2answers
51 views

Remove Specific File From Tar Archival Process After the Process Starts

When tar-ing up large directories (ie. a home folder for a backup/OS reinstall), it is often okay to exclude certain large files such as multi-GB videos. However, due to the all-encompassing nature of ...
1
vote
1answer
174 views

Output of `iw list`: phy_x corresponds to what interface?

I have 2 interfaces wlan0 and wlan1. When I want to see the modes that support my cards I do iw list and I see phy0 and phy2. How do I know what information corresponds to what card? In other words, ...
1
vote
1answer
224 views

Is it possible to establish a Socket session (between Server and Client) using shell commands ?

From what I read (only the very outline, i do not know C Language) a Socket session is established between a server and a client by calling functions for both of them in a certain order. It starts ...
0
votes
1answer
79 views

Languages to use for console tools - Go, Rust, Javascript? [closed]

I'm planning to write a data cruncher command line tool, I'm considering Go, Rust and Javascript. But I'm afraid of jeopardising the project by using something not stable enough or painful to deploy. ...
1
vote
2answers
72 views

sending an email on command line: “550 aliases” error

I am trying to send an e-mail from Linux command line by executing: echo "this is a test" | mail -s Subject <email address> The error I get is: send-mail: RCPT TO:<email address> (550 ...
-1
votes
1answer
36 views

how to still have control with sleep? [closed]

I computed a clock on a file exerciceIV_2.C with the gedit command of unix, And, by a night of september, I decided to use sleep 1000 in order to stop the clock. I wasn't able to use my device for ...
-1
votes
1answer
36 views

What is the effect of a lone backtick at the end of a command line?

I accidentally typed in cd ` into terminal today and terminal didstrange things. It put a "> " signed on the next line followed by my cursor like it wanted some input. No matter what I entered ...
4
votes
3answers
277 views

grep regular expression solution (greedy not working)

I have the following text in the data.txt file :MENU1 0. public 1. admin 2. webmail :SYNTAX ! opt1, ... : :ERROR1 Error #1, blah... blah.. blah... Please do ... :ERROR2 Error #2 ... and I want ...
6
votes
3answers
225 views

Identify alias for the command typed

Is there any shell/shellscript which identifies that there is already an alias for the command I have typed on the command line. Eg On shell I type git checkout master Shell prints "You can use ...
21
votes
3answers
8k views

IP to Country console command

Is there a console command that takes an IP address as an input and shows its geographical information like city, country, ISP, etc.?
3
votes
1answer
849 views

Using iscan (GIMP plugin) from the command line

I'm something called iscan to use my scanner. However to use it, I need to go through a GUI to get my scanned pdf. When I run iscan --help (because just iscan launches the GUI), it tells me that it is ...
2
votes
1answer
613 views

How to install a particular version of boost with brew on MacOSX?

The command "brew install boost" works for me on my MacOSX, but it installs the latest boost 1.57. How to use brew to install the older 1.55?
2
votes
2answers
124 views

How can I compare two files and create another file that aren't in first file?

file1 contains: 100 200 300 400 file2 contains: 500 600 700 200 300 Expected output file will be: 500 600 700
2
votes
1answer
460 views

How to invoke Gnome 3 activity screen via mouse button?

What I'm trying to do I'm using a Logitech MX Revolution mouse, which has a button below the scroll wheel mapped to search, which I remapped to middle click. For doing so, I had to remap XF86Search ...
0
votes
1answer
136 views

Prompt user to enter for his/her user password to execute non sudo terminal command [closed]

As the question asks I want to learn how to prompt users' password for nonsudo commands EDIT: I think that I could not tell it clearly according to comments, so I will elaborate my request with ...
1
vote
1answer
229 views

Installing handbrake on Debian - Wheezy server

I'm trying to install the handbrake CLI onto my debian(wheezy) server. I've tried to imitate an answer here but it is not working. I've added deb http://cdn.debian.net/debian wheezy-backports main to ...
0
votes
1answer
93 views

Match everything after backslash and before space

I have strings similar to the following: *unknown*\*unknown* (8) hello\morning (3) I'm trying to match just morning or *unknown\*. So far I have tried: [^\\]+$ But that matches from backslash ...
18
votes
2answers
2k views

What is the difference between * and *.* while copying?

What is the difference between following 2 commands? cp -rp /dir1/*.* /dir2/ cp -rp /dir1/* /dir2/
1
vote
2answers
706 views

Count how many lines start with which characters

I have a file with a number of lines in a file filename. I want to count how many lines start with character 'a', with 'b' and so on in one go. What command i should execute.?
20
votes
6answers
13k views

How to display numbers in reverse order using seq(1)?

I have iterate over numbers in various order. I am able to display them in increasing order, even with steps like: $ seq --separator="," 1 10 1,2,3,4,5,6,7,8,9,10 $ seq --separator="," 1 2 10 1,3,5,7,...
2
votes
1answer
80 views

Unix - Finding names with egrep

I am trying to come up with an egrep script to distinguish names--words which are written with an initial upper case, such as countries, names of people etc--in a set of txt files. I want to ignore ...
10
votes
3answers
22k views

Example xfreerdp usage with clipboard plugin

FreeRDP 1.0.2 has an updated their parameter syntax for "better interoperability with Windows." I had a problem using the old syntax where the clipboard plugin only worked the first time I pasted, ...
3
votes
2answers
2k views

Execute command through SSH

I am writing a script to check whether all the servers in my organization are functioning properly. One of those is Zimbra mail server. I am trying to send a mail through sendmail provided by zimbra ...
1
vote
0answers
191 views

vsftpd 2.2.2 - 500 OOPS: priv_sock_get_cmd

I'm very new to Linux, and I'm currently experimenting with it and several services in order to familiarize myself to it. I've installed vsftpd to access the machine over ftp however I'm getting the ...
1
vote
4answers
3k views

command to find processor speed on zlinux machine

I have the following system : $ uname -a Linux <machine-name-snip> 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:58 EDT 2008 s390x s390x s390x GNU/Linux $ cat /etc/redhat-release Red Hat Enterprise ...
1
vote
4answers
1k views

How to list filenames that contain spaces and special characters without using find

I am writing a script that requires me to provide a list of files in my directory, whose filenames contain spaces,*,?,$,%,etc. How can I do this, I have seen multiple posts but couldn't find anything ...
1
vote
3answers
80 views

How to undo typo `set -ovi`?

I wanted to execute set -o vi, but instead I did set -ovi. Now when I checking set -o I see extra weird options such as: $ set -o set -o ... update_terminal_cwd; and as result, ...
0
votes
1answer
26 views

pushing messages as root to user using startx

I am using a Raspberry Pi 2 running raspbian. This little guy is going to basically be a media server. I would like to be able to push messages when I ssh into the thing, but when I try to echo "...
0
votes
1answer
184 views

Compare columns between different files

I have multiple files ( about 20 files with 30000 lines and 32 columns) and I need to keep only the lines that start with the same string. I found these cases that are quite similar to what I need but ...
141
votes
8answers
66k views

How can I find broken symlinks

Is there a way to find all symbolic links that don't point anywere? find ./ -type l will give me all symbolic links, but makes no distinction between links that go somewhere and links that don't. ...
2
votes
1answer
948 views

How to compress a mysql dump using 7z via a pipe?

I've been attempting to compress my mysqldump output via 7z using the pipe operator (I have seen this question, but its answer uses xz not 7z). This is what I have tried so far: mysqldump -u root -p ...
1
vote
1answer
256 views

notify-send doesn't work from script but works from terminal

I am trying to run this script: test.sh #!/bin/bash BAT_LEVEL=`acpi -b |grep -Eo "[0-9]+%"|grep -Eo "[0-9]+"` CRIT=0 if [ $BAT_LEVEL -gt $...
7
votes
4answers
5k views

Write text messages between Unix and Windows

Is it possible to send text messages between two users of the same LAN, but the first running Windows with cmd and the second running Linux/Unix? I am not looking for an instant messaging service. I ...
1
vote
1answer
78 views

What does =~ mean? [duplicate]

Ran across a shell script that had '=~' in a contitional and I was wondering what it meant. Not much luck on Google or SO sites. Example: if [[ $VAR =~ 'this string' ]]
1
vote
1answer
138 views

Pipe multiple file from curl to other program

I would like to download several images (from a server with a self-signed certificate) and view them all with feh. Is this possible with a single command? Something like curl -sk -b ...
12
votes
3answers
1k views

Order of redirections

I don't quite understand how the computer reads this command. cat file1 file2 1> file.txt 2>&1 If I understand, 2>&1 simply redirect Standard Error to Standard Output. By that ...
12
votes
2answers
12k views

What does the tilde (~) mean at the end of a filename? [duplicate]

What is the file with the ~ at the end of the filename for? $ ls # aliased to add flags -rwxrwxr-x 1 durrantm 2741 May 16 09:28 strip_out_rspec_prep_cmds.sh~* drwxrwxr-x 13 durrantm 4096 May 16 14:...
0
votes
1answer
25 views

Is there a way to get the status of the audio CD (idle/playing)?

I am wondering if there is way to get the state of the CD drive in the command line if there is an audio cd inserted. Can you play a track on the CD and then get back somehow from the system the '...
0
votes
2answers
47 views

Remove leading 10-digit number from filenames

I have thousands of image files that have a 10-digit number appended to the beginning of the filenames. Immediately following each string of 10 numbers is an underscore. They look like this: ...
2
votes
3answers
61 views

Listed Frequency of Different Strings in a Particular Column

So I'm fairly new to linux, and needed help figuring out how to find how many times a particular string shows up in column 4. This is my data: 25 48656721 48656734 FAM132B ENSCAFT00000019683 4 0.51 ...
8
votes
4answers
887 views

find all end subdirectories in a tree

given the following structure: oz123@debian:~/ $ tree . . ├── a │ ├── a1 │ ├── a2 │ └── a3 ├── a1 │ ├── a11 │ ├── a12 │ └── a31 ├── b │ └── b1 │ ├── b11 │ │ └── b21 │ ...
4
votes
3answers
8k 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" completely....
34
votes
13answers
16k views

Is there a robust command line tool for processing csv files?

I work with CSV files and sometimes need to quickly check the contents of a row or column from the command line. In many cases cut, head, tail, and friends will do the job; however, cut cannot easily ...