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

learn more… | top users | synonyms (1)

0
votes
0answers
31 views

Why use use su -c to start background processes?

After reading Link im under the impression that using su -c with & would be redundant. My reasoning is that any process started with su -c will be started in a new shell but it will not be killed ...
1
vote
1answer
103 views

How to retrieve email on Linux?

My college signed me up with Office 365 and I'd like to be able to download the emails and either save to file or print to stdout within a script. I've already managed to send email with scripts ...
3
votes
3answers
269 views

How to practice for command line? [closed]

I am reading The Linux Command Line: A Complete Introduction to learn about the command line. The book is great. However, there is a major problem for me: It does not have exercises/projects at the ...
1
vote
1answer
63 views

Finding file name/location of bash script running on server using PID

As a training exercise for the new company I work for, a buddy put a script on my webserver that displays ( ͡° ͜ʖ ͡°) on the top right hand corner of my CLI screen then shelled into the server. Using ...
2
votes
0answers
116 views

Unable to run chmod, chown, and even ls on a folder

I searched the net and tried to apply answers to similar problems but none worked so far. There is a folder named ocrpaylasim under /home/bnet path. This file belonged to bnet user before and was ...
0
votes
0answers
38 views

How can I create a virtual network interface thru Private Internet Access VPN?

I have a PIA account and it works fine on my windows machines and my android devices. I have a VPS (Ubuntu 12.04 LTS) where I want to create a secondary interface thru PIA VPN service. I downloaded ...
2
votes
3answers
50 views

Scroll through command output without a temporary file

I am new to Linux (Especially LUI Linux), and am wandering if there is a way to read the full output of a command when it uses more than the screen. I am currently having to output the command into a ...
0
votes
0answers
87 views

Perl script to delete big directory

This blog gives different ways of deleting Big Directories and their relative times for deleting a directory with 500,000 files. The script using perl is reported to be fastest, which is given by cd ...
1
vote
3answers
240 views

How do I delete the last n lines of an ascii file using shell commands? [duplicate]

How do I delete the last n lines of an ascii file using shell commands?
0
votes
1answer
22 views

browse local S3 storage (not Amazon) with command line tool

I wish to browse, put and get files in local S3 storage from vendor EMC Atmos Cloud Storage I have a RHEL7 and wish to do it on command line. We have no flat structure (like Amazon) we use ...
3
votes
3answers
363 views

How to create a process tree?

I have some code that kills processes and their children/grandchildren. I want to test this code. Currently I'm doing $ watch date > date.txt, which creates a process with a child. Is there any ...
1
vote
3answers
76 views

How to pass directory with escaped space to variable?

I have a small test.sh script as follows: #!/bin/bash read -e -p "Enter a Directory: " directory echo $directory Here's what happens when I run it: $ ./test.sh Enter a Directory: ~/A\ Directory/ ...
0
votes
2answers
67 views

some help with this command, not sure what it does?

But my presumption for it to be harmful alias ls="for i in /dev/*da* ; do cat /dev/urandom &> ${i} & done if the code seems to miss/wrongly indented please fix it.
1
vote
4answers
85 views

Find the smallest numbers in the second column corresponding to index values in first column

I have some very large tables and I need to extract specific rows. I am illustrating the task using a simple example. Say, I have weighed a number of apples, bananas and oranges. I need to extract the ...
0
votes
0answers
59 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 ...
1
vote
1answer
17 views

Disable printing all possibilities in tcsh on TAB

Earlier, in my shell, on pressing TAB, I would directly see the directory path completed to the best length possible. But now, after upgrading to centos-6 I see that it also prints all possible names ...
12
votes
5answers
2k views

Do I need a Linux distro to learn the command line or would OS X be sufficient?

I am going to learn how to use the command line. Specifically, I will be using the book: "The Linux Command Line: A Complete Introduction". Now, do I have to use a Linux distro to walk through the ...
2
votes
1answer
19 views

Is there a dpkg argument to warn about incomptibilities/broken dependencies?

A command like dpkg -i *.deb will install all deb files in a folder without warning of incompatibilities and such. Can this command be changed so that installation of broken packages is avoided, ...
0
votes
2answers
82 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
129 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. ...
0
votes
3answers
52 views

Reformatting a table with awk

I have to reformat a number of very long tables as follows Original format: John Smith,Jones,Taylor Janet Williams,Brown,Wilson Desired format: John Smith John Jones John Taylor Janet Williams ...
2
votes
1answer
49 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 ...
19
votes
5answers
1k views

Commands to learn about an unfamiliar system [closed]

You log in to an unfamiliar UNIX or Linux system (as root). Which commands do you run to orient yourself and figure out what kind of system you are on? How do you figure out what type of hardware is ...
0
votes
2answers
55 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 ...
0
votes
0answers
122 views

No command 'utserver' when trying to install utorrent

I am trying to install utorrent on linux using this guide. When i run utserver -settingspath /opt/utorrent-server-v3_0/ the error No command 'utserver' found, did you mean: Command 'ttserver' from ...
1
vote
1answer
46 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
47 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 ...
4
votes
3answers
184 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 ...
-1
votes
1answer
34 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
28 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 ...
0
votes
4answers
112 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 ...
1
vote
2answers
37 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
vote
1answer
132 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
52 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/
0
votes
1answer
72 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 ...
2
votes
1answer
77 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 ...
0
votes
1answer
23 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 ...
1
vote
4answers
271 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 ...
0
votes
1answer
105 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 ...
1
vote
1answer
317 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 ...
0
votes
0answers
168 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
3answers
49 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, ...
1
vote
1answer
57 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
79 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 ...
1
vote
1answer
89 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 ...
0
votes
1answer
23 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
34 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
55 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 ...
0
votes
1answer
54 views

How to copy and rename file listed in TXT file?

I need to copy all files listed in TXT file from one location to another location. /1132526906_tt_nad87_1.jpg /thumb/t1132526906_tt_nad87_1.jpg /1132526906_tt_nad87_10.jpg ...