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

learn more… | top users | synonyms (1)

0
votes
1answer
22 views

How to use ClamAV to scan the memory

How can I only scan the computer RAM for viruses using the ClamAV command clamscan? I already tried, because I found it on ClamWin forum: clamscan --memory But it seems, that the Linux version ...
0
votes
2answers
38 views

What can cause my shell to look like this? [duplicate]

I'm currently developing a home automation framework for my apartment. This involves getting JSON over Serial from an Arduino. When the JSON can't be parsed (usually only on startup) I log it as an ...
2
votes
3answers
35 views

Is there a way to see the dimensions of a jpeg file in linux using the command line?

I have some .jpeg images saved in a file in a cluster at school. I am at home using PuTTY to access one of the Debian nodes. I'm able to get to the folder with all the images but I need to see the ...
14
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
35 views

how to move set of files in one-liner [duplicate]

I wanted to move 1000 files in a directory to another dir. I can do it if I'm in the original dir but if I try this mv $(ls /home/jeremy/source|tail -1000) /home/jeremy/dest from elsewhere, the ...
9
votes
4answers
15k views

Command Line Tool for monitoring Java Heap

Is there any command line tool for monitoring the heap size usage of Java in CentOS?
0
votes
1answer
51 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): ...
1
vote
1answer
17 views

Trying to copy/paste long script with multiple EOFs, Terminal starts running half-way through

Was trying to create a text block that I could just copy and paste into a Terminal window to accomplish something (in this case, create a systemd script to do maintenance on MySQL dbs, create a timer ...
0
votes
3answers
19 views

How to apply dos2unix recursively to all the contents of a folder?

Is there a way to apply the dos2unix command so that it runs against all of the files in a folder and it's subfolders? man dos2unix doesn't show any -r or similar options that would make this ...
10
votes
2answers
3k views

Check ping statistics without stopping

Is there a way to tell ping to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view: --- 8.8.8.8 ping statistics --- 2410 packets transmitted, ...
7
votes
6answers
3k views

How to grep-inverse-match and exclude “before” and “after” lines

Consider a text file with the following entries: aaa bbb ccc ddd eee fff ggg hhh iii Given a pattern (e.g. fff), I would like to grep the file above to get in the output: all_lines except ...
1
vote
2answers
41 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.
5
votes
2answers
892 views

Why does Bash history not record this command?

The command printf "#!/bin/bash\n" > t generates an error(bash: !/bin/bash\n": event not found), but hitting the up key does not recall the command so that I can modify it. Why is that? (What I ...
1
vote
0answers
16 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 ...
2
votes
1answer
2k views

Unable to install SciPy

I need to use the module skimage, which calls the module SciPy (I need to find contours) import numpy from sys import argv from PIL import Image from skimage import measure # Inicialization ...
2
votes
1answer
92 views

Updatedb unrecognized option '--localpaths='

I am attempting to update a single directory I created. I'm using updatedb so it will be found by the locate command. Command used: updatedb ...
3
votes
1answer
181 views

How can I change the error messages for 'touch'?

Lets just have some typical usage of touch as expected: $ touch this $ sudo chown root this $ touch this touch: this: Permission denied Now what I want to do is change touch: this: Permission ...
70
votes
14answers
37k views

How to grep a specific line _and_ the first line of a file?

Assuming a simple grep such as: $ psa aux | grep someApp 1000 11634 51.2 0.1 32824 9112 pts/1 SN+ 13:24 7:49 someApp This provides much information, but as the first line of the ps ...
2
votes
2answers
47 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 ...
0
votes
1answer
50 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
51 views

standard deviation using awk [on hold]

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
57 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 ...
50
votes
12answers
117k 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
39 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
15k 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
63 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
50 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
27 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
489 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 ...
2
votes
1answer
21 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 ...
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 ...
31
votes
7answers
4k 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 ...
11
votes
7answers
827 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
59 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 ...
-5
votes
1answer
60 views

'403 Forbidden' error only appears on Linux system; other devices connect fine from same IP address [closed]

When attempting to access the google.com listed first match for "ssid" on my Linux system -- http://www.webopedia.com/TERM/S/SSID.html -- I am getting the following error: Forbidden You don't have ...
4
votes
1answer
48 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
3answers
429 views

Why does my ls --help not work?

Marias-MacBook-Air:~ marias$ ls --help ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
0
votes
0answers
20 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
20 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
344 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
48 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
108 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
45 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 ...
10
votes
5answers
16k 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
1answer
3k views

IBM V7000 scripts for monitoring

Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send ...