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

learn more… | top users | synonyms (1)

0
votes
1answer
55 views

Only one line break in fasta file

I have a fasta file like: grep -A 7 -B 4 COSN229024 wrong.fasta: >COSN9627597 CGCTGGGCTCGCCTCCAGCCTGGCCTGCATTCCCAAATCTA >COSN8175610 CAAGAGAGAAATTCTGACACCTCCTAAGTCTACCAAGCTTT >COSN229024 ...
-2
votes
2answers
65 views

standard deviation using awk [closed]

I am using below command to get standard deviation of file A names 1 2 3 avg 23.3107 20.0372 21.7236 21.6905 awk '{x[NR]=$0 ;} END{a=$4; for (i in x){ss += ...
19
votes
4answers
16k views

How can I run a specific command for each find result?

How would one run a specific command for each file that was found by using the find command? For the purpose of the question lets say that I would simply like to delete each file found by find. I am ...
3
votes
2answers
62 views

Basic network via command line

I am using Fedora 23. Using the file explorer I "found" this page It shows where I can access other networks, I can click on them, and log in... My questions is: Is there an equivalent place ...
52
votes
12answers
122k views

How can I get a count of files in a directory using the command line?

I have a directory with a large number of files. I don't see a ls switch to provide the count. Is there some command line magic to get a count of files?
1
vote
1answer
49 views

Terminal color usage does not stay

I was wondering if any of you knew why doesn't my terminal keep displaying stuff colored, after I use the command ls -l -a --color=always I would like it to stay colored, so when the next time I type ...
31
votes
8answers
16k views

How do I split a flac with a cue?

I've got a full album flac, and a cue file for it. How can I split this into a flac per track. I'm a KDE user, so I would prefer a KDE/QT way, I would like to see command line and other gui answer's ...
0
votes
4answers
71 views

grep all strings that start with a certain char, and finish with another char

I need to grep all strings that start with "[" and finish with a certain string, e.g. "apal". So all chars in between these 2 chars would be shown as well. Given an input such as: ...
2
votes
2answers
66 views

Does the cat command pass back a file or the contents of the file?

Compare the following commands: cat f.txt | grep "someText" grep "someText" f.txt They both seem to work. But the documentation for cat says cat outputs the contents of the file rather than the ...
1
vote
1answer
32 views

Is there a portable way to get the name of the WiFi card on the command line without additional parsing?

In this tool, the name of the wireless interface is hardcoded to be wlan0. This was a reasonable assumption up through Ubuntu 14.04, but the wireless interface name appears to have changed in Ubuntu ...
13
votes
4answers
2k views

How can I make a graphical plot of a sequence of numbers from the standard input?

If have a long text file and I want to display all the lines in which a given pattern occurs, I do: grep -n form innsmouth.txt | cut -d : -f1 Now, I have a sequence of numbers (one number per line) ...
8
votes
1answer
1k views

How to write/edit/update the OsIndications efi variable from command line?

In the need to enter the UEFI firmware setup utility while using ultra fast boot (keyboard drivers are not loaded during POST), I wish to write to the "Os Indications" efi variable. My OS is Ubuntu ...
4
votes
2answers
497 views

Digging through huge gziped log files

From time to time I need to dig through huge log files (several GB unpacked) to debug a specific error. Now, vim is OK for browsing through the file, but when I need to find something in the file ...
0
votes
0answers
13 views

searching through command line history [duplicate]

I use reverse search when looking for a particular command on the command line by pressing CTRL + R. That returns the first command it finds in reverse order. To go back to the next further command I ...
11
votes
7answers
1k views

Move first N lines of output to end without using temporary file

Imagine an output of a command like 44444 55555 11111 22222 33333 how can I yank the first N lines (first two in the example above) and append them at the end, but without using temp file (so only ...
3
votes
3answers
81 views

Using grep/sort/find to extract unique values

I have a bunch of text files that are named in YYYYMMDD.Txt format (so today would be 20160420.Txt). Each file is basically a log that contains a timestamp and and a unique ID, each value is ...
4
votes
1answer
53 views

How to install from the command line in Arch Linux?

The company just gave us all a new virtual machine for development porpoises. It runs Arch Linux, which nobody here has experience of. The VM has no internet access, but we can side load files by ...
3
votes
2answers
493 views

Why does my ls --help not work?

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

Gnome (gdm) fails to start after command-line install

Installed gdm via the default openSUSE installer (zypper). The install completed successfully but gdm won't start from the command-line. I also have a KDE install which stalls on the loading bar, but ...
20
votes
2answers
8k views

What is meant by a shell is in “vi” mode or “emacs” mode?

This question follows directly from the answer. In this case I am specifically unable to understand the part which says: In that regard, its behaviour is closer to emacs' than with ...
1
vote
0answers
29 views

How to configure maven plugin from command line?

I'm trying to configure JaCoCo maven plugin from command line insted of using pom.xml. I have managed to execute prepare-agent so far with command: mvn -X -Djacoco.destFile=./coverage/jacoco.exec ...
4
votes
3answers
364 views

What's the quickest way to find duplicated files? [duplicate]

I found this command used to find duplicated files but it was quite long and made me confused. For example, If i remove -printf "%s\n", nothing came out. Why was that? Besides, why they used xargs ...
-4
votes
1answer
50 views

Is the value of a variable lost after a command is executed?

There is a functional difference between using: n=$1 shift And using: n=$1; shift in bash and zsh: the value of n is lost after the shift is executed in the first example. But both have the ...
0
votes
3answers
185 views

Help with tr command

Assume that the file ft has 25 lines of text. Explain the command: tail -15 ft | tr "a" "A" > ft and tell me how many lines the file ft has after the execution of the command. I understand that ...
0
votes
3answers
48 views

Get the file with the maximum month year

I have a requirement to get the file with the maximum month year. We have files in a directory as below: Zmx_0416_control.txt Zmx_0316_control.txt Now from these files, I need to get the file ...
20
votes
2answers
4k views

copy (to X clipboard) shortcut in .tmux.conf

In order to copy text to X clipboard in tmux, what I currently do is: go selection mode with prefix[ start selection with space (using mode-keys vi btw) select the text and press enter copy tmux ...
11
votes
5answers
17k views

How to remove blank lines from a file in shell?

I want to remove all empty lines from a file. Even if the line contains spaces or tabs it should also be removed.
0
votes
0answers
38 views

CLI connection from Raspberry Pi3 to bluetooth in solar PV inverter

I am new to bluetooth & trying to learn more so I can connect to my inverter. We have been able to use various command-line tools to: - scan & find my bluetooth mac address. - browse the mac ...
3
votes
1answer
70 views

command line tool to reserve code high light in output file?

For example, when using ack to search code in source files, the output is high lighted. But if you pipe the output into a local file, you lose the code high light. Do we have a command line tool to ...
7
votes
1answer
2k views

What do I need to add a virtual IPsec adapter?

I'm trying to set up an IPsec connection manually from the console with iproute2. What I need is a virtual interface (at best, a virtual IP address could also be sufficient) that IPsec-transforms ...
0
votes
2answers
22 views

Website is active but domain name not showing on WhoIs lookup from Linux command-line

I am trying to lookup the WhoIs entry for the following domain: anorien.csc.warwick.ac.uk However, while typing the URL directly into the browser displays a web-page, when I type: whois ...
2
votes
3answers
42 views

Show character at position in a file

I would like to print the character at a given position using only the command line. E.g.: <command> 5 Would output a if the 5th char of that file was a. Since I am dealing with big files, ...
1
vote
2answers
20k views

Access USB drive on Ubuntu server

I'm currently using a Ubuntu 14.04 server with command line access only. My .html files are on my Windows and I want to transfer them. What is the path in my Ubuntu server to get into my external ...
2
votes
1answer
28 views

Is there any way to detect file type and open it with GUI in terminal in Fedora? [duplicate]

For example , there are two files a.ppt and b.jpg . And I can call a magic method to open them appropriately just like : magic_method a.ppt magic_method b.jpg And it open libreoffice writer and ...
1
vote
0answers
26 views

What command is gimp using to print?

All programs/commands I attempt to print certain PDFs with (lpr, lp, Okular, Evince, Xpdf) print solid black pages. The one exception is Gimp, which allows me to import PDFs one page at a time and ...
0
votes
1answer
42 views

Tried to install Nvidia drivers, now I can only boot to tty [duplicate]

I'm on Fedora 23. I followed this guide and got all the way up to the "2.7 Reboot to runlevel 3" step. I did that step then rebooted and now I can only boot into tty. I tried to continue on with ...
0
votes
3answers
43 views

Using grep and looking for unique occurrences [duplicate]

I have a text file of this type, and I would look for any lines containing the string Validating Classification and then obtain uniquely the reported errors. I do not know the types of possible ...
3
votes
3answers
198 views

How to list available packages in a specific repository on Debian?

Is that possible to list available packages in a specific repository on debian jessie using the command line?
120
votes
8answers
544k views

How do I zip/unzip on the unix command line?

How can I create and extract zip archives from the command line?
2
votes
1answer
66 views

Create a file of fixed size with specific contents

I want to create a file of fixed size (1G, 10G, 100G etc) with a single random word of length within the specified limit on every line. I basically want this to run a benchmark which will sort the ...
8
votes
4answers
10k views

Unzipping a batch of files

When I try unzip filename.zip it works. However, I need to unzip a series of zip files. Why are: find . -name "*.zip" -print0 | xargs -0 unzip or ls *.zip | xargs unzip not working? In ...
7
votes
4answers
40k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
4
votes
4answers
462 views

Run the same command multiple times in background

How is it possible to run multiple commands and background them using bash? For example: $ for i in {1..10}; do wait file$i &; done where wait is a custom binary. Right now I get an error: ...
7
votes
1answer
3k views

List of modified files of the past 24 hours

Is there a reliable way to have a system that mails me the list of files that were modified in the past 24 hours inside a set of directories? (like /home/*/public_html/* and /home/*/*domains/*)
0
votes
1answer
1k views

How to boot GUI on a fedora 21 server through the command line

I am trying to install a GUI onto my fedora21 virtual machine. The only problem is due to the nature of work i am doing it needs to be done through the command line( i am using a program called ...
54
votes
13answers
130k views

What is the fastest way to view images from the terminal?

The terminal is very fast and convenient way to quickly access directories and files (faster than find and click on the directory). One thing that it cannot show in text-mode is "pictures". What ...
56
votes
9answers
145k views

How to overwrite target files with mv?

I have a ton of files and dirs in a subdirectory I want to move to the parent directory. There are already some files and dirs in the target directory which need to be overwritten. Files that are only ...
0
votes
3answers
785 views

How to stop Rainlendar from hiding on the Linux Mint desktop?

Rainlendar is a great tool to keep events and tasks on the desktop (I did not find a better solution yet). The problem is that the application completely hides if you press: The "Show Desktop" ...
0
votes
0answers
75 views

Running a batch script remotely using rdesktop

I have a setup that implies calling rdesktop on a remote machine which is accessed through ssh: user@192.168.1.110:~$ ssh user@192.168.1.120 -X and then running rdesktop as: user@192.168.1.120:~$ ...
1
vote
0answers
22 views

Splitting correctly avi file

I'm trying to split an avi file as follows. avconv -i file.avi -vcodec copy -acodec copy -ss 0 -t 10 out.avi and this works (It creates a chunk with first 10 seconds of the video). The problem is ...