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

learn more… | top users | synonyms (1)

0
votes
1answer
74 views

What is the meaning of xargs show limits output

You can use xargs to discover limits about the commandline you're using: $ xargs --show-limits Your environment variables take up 1901 bytes POSIX upper limit on argument length (this system): ...
18
votes
4answers
1k views

How can I see the whole file and also wait for more data to be added to that file?

I want to read whole file and make it waiting for input, just like tail -f but with the complete file displayed. The length of this file will always change, because this is a .log file. How can I ...
1
vote
2answers
50 views

How to find all files in /etc beginning with P

I would like to know how to find all files in the /etc file beginning with P, which I will then store the results of in a new file. So far I have $find /etc -name Unsure of what comes next.
1
vote
0answers
56 views

How to use xpra like xvfb-run?

xvfb-run allows me to open a display and run a graphical app and when the app finishes xvfb closes too. for example xvfb-run --auto-servernum --server-args="-screen 0, 1920x1080x24" nw script.js ...
0
votes
1answer
57 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
73 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 += (x[...
2
votes
2answers
64 views

Shrinking Raspberry Pi SD .img via Ubuntu Server (cli)

I installed Raspbian to a 16 GB card and expanded the filesystem. When I made a dd backup of the card, the .img file output was ~16 GB. Most of it is unused space in the ext4 partition—I'm only using ...
3
votes
2answers
70 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 ...
1
vote
1answer
61 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 ...
2
votes
2answers
78 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
38 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 ...
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 ...
2
votes
1answer
72 views

FFMpeg : Converting a video file to a gif with multiple images from video

I am working on a project in which the user can upload videos. Is there any way with FFmpeg I can take some images from the video and create a GIF out of it? As the project is in Java, I have a way ...
4
votes
1answer
57 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 ...
0
votes
0answers
34 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 ...
31
votes
7answers
5k views

How do I create a blank PDF from the command line?

I recently needed a single blank PDF page (8.5" x 11" size) and realized that I didn't know how to make one from the command line. Issuing touch blank.pdf produces an empty PDF file. Is there a ...
3
votes
3answers
106 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 ...
1
vote
0answers
38 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 ...
11
votes
8answers
2k 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 ...
4
votes
3answers
389 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 -I{}...
-4
votes
1answer
52 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
52 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 ...
0
votes
0answers
51 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 ...
0
votes
4answers
78 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: [44060]apal223reaea[...
0
votes
2answers
30 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 anorien.csc....
2
votes
3answers
55 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, ...
2
votes
1answer
32 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
27 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
3answers
51 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 errors....
3
votes
3answers
218 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?
2
votes
1answer
74 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 ...
5
votes
1answer
98 views

correctly splitting an 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 ...
1
vote
0answers
42 views

How do I go about downloading 100,000 torrents?

I want to download a large number of torrents on Ubuntu, while keeping a positive ratio on the torrent tracker. Since various torrent clients won't support that many active torrents (from what I ...
0
votes
0answers
101 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:~$ ...
2
votes
2answers
76 views

“ls” command stuck trying to list a stale mount point. How do you kill/stop it?

When working with remote filesystems such as sshfs or smbfs, it is command that they become stale due to network problems. To check if the mount is stale or not, I usually use the command ls to see if ...
-1
votes
3answers
53 views

How to swap two words with sed and with multiple delimiters?

Just letters are accepted in words, any other characters are delimiters. I want to exchange the first word with the third word. sed -E 's/([A-Za-z]+) [^A-Za-z] ([A-Za-z]+) [^A-Za-z] ([A-Za-z]+)/\3 \2 ...
-1
votes
3answers
29 views

Write in a part of a document the current time? [closed]

How can you write the current time from terminal in a document? In a specific place of the document, I mean.
3
votes
4answers
57 views

Search within a search

I've gotten used to using grep for my command line searches and wanted to know how to successfully do a search using the result of another search. Here's my attempt, where I am looking for 'tool' ...
1
vote
2answers
28 views

Wait for program in a clean way (e.g. in a different terminal window)

If you want to execute one command and then another one after the first one finish, you can execute command1 & which prints the PID of the process executing command1. You can then think of ...
1
vote
3answers
111 views

Why 'cat' can't read content of pdf files?

When tried the command cat < 1.pdf it printed a very large output, which was totally incomprehensible to me. The content of 1.pdf was abc. The output was like this: ÀýÓëöûcÎ=ÉÐÎTaüÍ8]ö¹mg:=Rú*@...
0
votes
0answers
29 views

Multicore benchmark

I'm looking for a way to benchmark a multi-core CPU. I found this #!/bin/bash echo "scale=$1; a(1)*4" | bc -l The first argument is number of digits to calculate. Now we can run in parallel (4 ...
1
vote
1answer
53 views

How to organize files in Linux/Unix shell?

I would like to try to organize my documents, and I was told that I can do this using the linux/unix cygwin terminal. I searched for the command in google but all I ever did find was organizing the ...
2
votes
1answer
59 views

How can I merge 2 disk images into one with 2 partitions?

I have 2 (relatively small) disk images for qemu (raw format) containing different filesystems (say fat and ext4). I want to put them into an usb stick as two different partitions so that I can plug ...
0
votes
1answer
37 views

(ls) command won't show exact size - Weird output [closed]

I am trying to find the size of the files on my hard drive in exact bytes, but whenever the size gets too big the number turns all weird (like 1.98329e+12). Can I stop it from doing this or convert ...
3
votes
1answer
102 views

free command output: gentoo (redhat?) vs debian

I noticed there is a difference between outputs of free command: On debian: $ free -h total used free shared buffers cached Mem: 4.0G 3.4G ...
0
votes
1answer
62 views

How to run a command on remote host from a service?

I have a service in '/etc/init.d'. In that service, I run a command on a remote machine using ssh as a user. Currently I do this in the following way: sudo -u user bash -c "ssh user@172.21.6.70 '...
2
votes
4answers
675 views

Why does the grep command ignore the period in the search string?

The command that I am using: find . -type f -name "*.sql" -exec grep -i -l 'schema_name.' {} + What I want to search is all the files which contain schema_name.. But the find command is ignoring ...
2
votes
2answers
87 views

What is happening after kill -CONT <PID>?

I have suspend a process through kill -TSTP <pid>. Then tried to continue it with kill -CONT <pid>. But After completion of process, control is not returning to bash. Why this is happening?...
4
votes
2answers
71 views

Why does path-completion in bash not always work?

With different bash-environments (different installations) I have different behaviors in terms of path-completion when hitting TAB on the command line after . Where is this handled? One specific ...