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

learn more… | top users | synonyms (1)

1
vote
2answers
68 views

Giving EOF character from command Line

I am reading character from command prompt, and checking for EOF for termination of program. But when I am giving command Ctrl+D it is not taking as a EOF. Kindly specify what to do for it. Ctrl+C is ...
-1
votes
1answer
97 views

What does ls -l | wc do?

I cannot figure out what this command does. It produces 3 numbers in my terminal but with no explanation of what those numbers are. I understand ls -l lists all files in log list format and wc is word ...
10
votes
2answers
519 views

How to redirect the output of a command to an already existing file without deleting its contents? [duplicate]

I am making a backup of some files and am creating a checksum file, checksums.txt, to later check the integrity of my data. However pasting each checksum manually into the file is inconvenient since ...
1
vote
0answers
97 views

How to run full SSD disk check with `fsck` command on system reboot (Debian)?

Please advice how to run full SSD disk check with fsck command on system reboot? (Debian) sdb2 is root, sdb1 is boot partitions. What is recommended options and where to find check report? I would ...
1
vote
2answers
25 views

How can I open the file with the most matches for a given regex?

Let's say I have a directory ~/mydir that has a whole bunch of text files in it. I want to search for searchterm in this directory and then view the file that has the most matches. How can I do this ...
0
votes
0answers
122 views

how to start a new instance of terminal in current terminal window ? (in Redhat)

I'm working on a project to port a windows program to Linux. Is there any command I'm using Redhat to replace the equivilent of the windows cmd /c? (btw, gnome-terminal -x doesn't work for me) cmd ...
1
vote
1answer
102 views

Skip first line (or more) in CSV file which is used to rename files

I have used the info from another question on Stack Exchange to allow me to rename files using the info in a csv file. This line allows me to rename all files from the names in column 1, to the names ...
1
vote
1answer
66 views

How can I safely send email over encrypted connection from the command line?

I found the following related questions on the stackexchange network: stackoverflow - Connecting to smtp.gmail.com via command line serverfault - Using nc.exe (NetCat) to send emails to secured SMTP ...
0
votes
2answers
48 views

I am trying for a tar call and getting the below error

I am trying to use tar and get the following error: $ tar --strip-components=1 xf /data/rvm-latest.tar.gz  tar: You must specify one of the `-Acdtrux' or `--test-label' options Try `tar --help' or ...
0
votes
1answer
23 views

How to take database backup and restore? And how can I view it?

I am using this commands to backup and restore my database mysqldump -u transgenic -p[ramesh] [transgenic] > transgenic.sql mysql -u transgenic -p[ramesh] [transgenic] < transgenic.sql I am ...
1
vote
0answers
25 views

What command line tools can be used to manually perform each step of an entire network “conversation”?

I know, I know; the phrase "network conversation" is imprecise almost to the point of meaninglessness. Let's take this specific scenario: I plug in a computer to a DHCP enabled router, open a browser ...
2
votes
1answer
57 views

Processing table with comma separated values in different columns

I'm trying to do the following for a while but without success. The data I received has comma separated values in each separate columns. The first value in column 6 before the comma is always related ...
2
votes
5answers
185 views

How do you open the UNIX shell?

How do you open the unix shell or UNIX command-line shell on Ubuntu?
0
votes
0answers
15 views

npm installation on linode server

I am trying to install npm on linode server by the command: sudo apt-get install npm -g It says libc-bin libc6 libssl1.0.0 packages will be upgraded, but I am not sure if it is okay to install the ...
2
votes
1answer
47 views

Adding two columns together in CSV and outputting to new CSV file

I have a problem I have been trying to figure out: We have a stock file CSV, which contains the stock in multiple locations. The csv looks like this: ...
0
votes
2answers
51 views

Automatically rerun something with sudo if root needed [duplicate]

I'm running Arch Linux in a virtual machine and it's getting REALLY annoying that since some thing require that I cannot be root, I need to sudo most of my commands. It would be nice if I could do ...
1
vote
2answers
31 views

Position of r before and after k in Sort

I have tried the following two scripts to sort a CSV file $ sort -t"," -k1,1 -k3,3 -k4,4 -k6,6r myFile.csv and $ sort -t"," -k1,1 -k3,3 -k4,4 -rk6,6 myFile.csv I found having the -r before ...
0
votes
0answers
47 views

Add colors to mailx inbox

Is there a way to add color to the mailx inbox. I know there is dircolors and also the bash hex colors. I am not sure if mailx can add some of these tools to colorize replied, purged or forward ...
2
votes
4answers
48 views

how to get a different time-clock on CLI apart from your time-zone?

Is there a way to invoke or know a different clock or time on the CLI. The thing is I'm on UTC+5:30 time but at times need to know time in different time-zones. If there is a CLI way in which this can ...
12
votes
5answers
881 views

How to recall a previous command (without execution) in order to change it?

I can't remember the trick where I could get the last command without running it: let's say I want to be be able to access the command !1255 when pressing the up arrow key and modify the command. So ...
8
votes
3answers
395 views

Command redirection to multiple files: command >file1 >file2 [duplicate]

I have this command: cat somefile >file1 >file2 After I executed this command I can't figure out why file1 has nothing in it. It should have the output of the first file (somefile), but ...
0
votes
0answers
24 views

Installing swftools with dependencies on a server with no internet connection?

I am trying to install a package on a Red Hat server which does not have internet connection by which I could directly download and install dependencies. Where can I download the swftools package ...
0
votes
2answers
38 views

Merge Two files depending on a Column, nth occurrence of a string in the column of file 1 to be merged with nth occurrence

Merge Two files depending on a column, nth occurrence of a string in column1 of file1 should be merged with nth occurrence of the same string in column1 of file2. I tried join but the results are not ...
0
votes
0answers
32 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
108 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
282 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
118 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
52 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
89 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
275 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
24 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
375 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
78 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
89 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
62 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
84 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
137 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
58 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
132 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
47 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 ...