Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0
votes
3answers
58 views

Bash, get links from pdf

Os ubuntu. Need to get links or more data (for example binding layer from QuarkXPress application) from pdf to text, in terminal. Tried pdftotext, but seems links are not exported, pdfgrep is the ...
3
votes
3answers
2k views

What is a Linux command that lists only USB storage devices?

I would like to list only the USB storage devices connected to my computer. Since these are SCSI disks, I used the command lsscsi, which lists the USB drives as well as my computer's hard drive and CD ...
0
votes
2answers
51 views

Piped greps for looking inside files

(self-migrated from ask-ubuntu because it's linux-related, not ubuntu, and my os isn't ubuntu) I'm trying to make a grep that looks like this: grep -r 2019 | grep -riv FAILED | grep -rl DSL I want ...
-1
votes
1answer
87 views

What is a system tool? [closed]

I frequently come across the term system tool, so I wanted to understand the exact meaning of it in Linux. Which of the following three explanations of a system tool in Linux is correct? Is a system ...
0
votes
0answers
15 views

CLI or ncurses tool for browsing local network?

I have a console-only SSH-based pivot box inside a remote location. I want a console or ncurses-based tool that shows me active real-time information on which hosts are up. IP, hostname, etc. ...
3
votes
1answer
70 views

How to trim down Amazon Linux OS for more free space?

I use EC2 on Amazon Web Services. The OS of the t2.micro instance is a customized “Amazon Linux” with 1 GiB RAM and 1 vCPU. When accessing this instance via their Cloud9 IDE I find that by default ...
2
votes
3answers
167 views

How to delete hibernation files on deb based system

I have a Kali VM that is seized up, during booting it says "resuming from hibernation" and does not progress. There is no disk i/o. I am wondering if it is possible to completely delete the files ...
149
votes
22answers
127k views

Markdown Viewer

I found a file formatted with Markdown. Could you guys suggest what viewer that I could use to view this type of files? Hopefully one without gui (if it's possible) Update I was actually looking for ...
1
vote
2answers
1k views

How to find commands associated to a package? [duplicate]

Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin package: $ sudo apt install geoip-bin [...] $ geoip-bin geoip-bin: command not ...
0
votes
1answer
2k views

open up emacs in gui instead of terminal

I downloaded Emacs in Linux 14.04, and when i type Emacs filename.c, it opens Emacs in the terminal instead of the external Graphical User Interface. How do I force Emacs to open outside of the ...
42
votes
6answers
122k views

Move all files with a certain extension from multiple subdirectories into one directory

I have a bunch of .zip files in several directories: Fol1/Fol2 Fol3 Fol4/Fol5 How would I do move them all to a common base folder?
2
votes
3answers
667 views

Scroll by line in terminal rather than by page Shift + PgUp

Is there a keyboard way to scroll the terminal by line the same way we scroll with mouse wheel? Shift+PgUp/PgDown give only by-page scrolling. I would like to scroll slowly as with mouse wheel. My ...
0
votes
2answers
69 views

How to save the progress of the “find” command?

I have big directory tree of files. I often use the find command to locate something in that tree. The first time after a reboot it takes some time, but subsequent uses are almost instant. Obviously ...
56
votes
11answers
99k views

Is there a simple linux command that will tell me what my display manager is?

Is there a simple linux command that will tell me what my display manager is? I'm using Xfce. Are different desktop environments usually affiliated with different display managers?
23
votes
7answers
59k views

How to remove blank lines from a file (including tab and spaces)?

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

Quickest way to move a line in a text file before another line in a text file?

I have the line number 55 in a text file which I want to move just before line number 23 in the same text file. I know that you can move lines up by a certain number of lines 1, 2 but is it possible ...
0
votes
0answers
30 views

Search all disk images for a file name?

When backing up many SD card images onto a large HDD, I am not sure whether one SD card is already included or not. I would like to search all the images for a file name saved on that card, e.g. ...
3
votes
1answer
359 views

What is the meaning of the string **/* when used with grep?

I came across this picture (below), obviously it is a pun or some kind of allusion incorporating command-line expressions. Frankly speaking I do not understand anything of it except for grep -n. ...
52
votes
5answers
134k views

How to avoid the need to issue “y” several times when removing protected file

I'm looking for a solution to be used as a response to "rm: remove write-protected regular file [x] ?" I was thinking of issuing a character followed by carriage return for several amount of times, ...
71
votes
7answers
138k views

How to use command line to change volume?

I am trying to control the volume using my programming script. How can I do the following in Fedora 15, Ubuntu linux? Mute/ Unmute Volume up and volume down Note: Please note that I use a web USB ...
0
votes
2answers
46 views

Using command line in Fedora to print/echo certain lines in a file [duplicate]

For Fedora OS I'm still learning here, but I need help to insert a command for example "XXX" to say that I have a file that contains 1000 lines of single product names. I need to write a command to ...
2
votes
1answer
405 views

/bin/sh: 0: Can't open sh

I'm trying to run a simple C program. #include <stdio.h> #include <unistd.h> extern char** environ; int main(){ // execl("/bin/sh","sh","-c","/bin/ls -l",(char *) NULL); char* argv[...
1
vote
1answer
107 views

How to programmatically change settings of xfce4-terminal?

With terminal emulators like gnome-terminal, it is possible to change settings programmatically, from the command line using dconf and gconf. But I have trouble finding a similar mechanism for xfce4-...
0
votes
0answers
31 views

start executable without “open” cmd

I installed (using make...) a very interesting text editor called "aoeui" by peter m klausler on my OSx Mojave 10.14 https://sites.google.com/site/aoeuiandasdfg/ I can start it in the terminal with "...
0
votes
6answers
308 views

On Linux terminals, why doesn't cd.. work?

On Windows/DOS terminals a cd.. works well. On Linux terminals the dots from the cd command have to be separated. I'd like to know how/why is this necessary for the parser to work. If no space is ...
0
votes
0answers
28 views

Wifi problem with my Enhanced beaglebone : debian 9.4

I am working with sancloud Beaglebone debian 9.4, I am trying to scan wifi and connecting. I am using a connman command line interface, After scanning Wifi, I can't find the router wifi,but I found a ...
0
votes
1answer
1k views

Copy specific folders via lftp

I want to copy data using lftp login from server. Here is my command to copy all the data. lftp -u uid,pwd -e 'mirror -c /home/dcr96/TCGA' sftp://rob2056@serapeum2.qib.pbtech This copies the data ...
7
votes
2answers
875 views

How to make sure OpenVPN is connected?

I need some sort of "safeguard" for my VPN connection. If the connection drops, the machine shouldn't even reach the internet. (I can reach the machine by other means.) Is it possible somehow? If I ...
119
votes
36answers
56k views

Quick directory navigation in the bash shell

I would like to frequently switch between directories that are in totally unrelated paths, for example /Project/Warnest/docs/ and ~/Dropbox/Projects/ds/test/. But I don't want to type cd /[full-path]/...
0
votes
2answers
52 views

How to remove everything after the 2nd underscore but keep the other columns?

my file.txt looks like this variant_id pval_nominal 1_752721_A_G_b37 2.23485e-05 1_900397_C_T_b37 3.04603e-05 1_928297_G_A_b37 2.12455e-05 I am trying to remove everything after the 2nd underscore ...
4
votes
1answer
176 views

is it possible to colors the prompt for (reverse-i-search) context menu?

I am using fedora 25 but I think this is a general behavior on unix system. When I ctrl+r in a command-line environment I can start to type in and anything I type will get to be matched backward in ...
49
votes
6answers
210k views

Connect to a Bluetooth device via Terminal

I'm using Mint 15 w/ Cinnamon. I bought a set of bluetooth speakers and I'm trying to connect to them via terminal. Via the GUI I can see them normally and I am connected to them. I want to make a ...
0
votes
1answer
43 views

Pass piped command line to xargs

I have this command line: curl https://token-api/42 | awk '{ print $0 }' which produces this output: {"id":"PX-12345","expiresAtUtc":"2020-07-05T06:55:52","createdUtc":"2019-07-15T06:55:52"} The ...
4
votes
1answer
138 views

How to set shell to wrap words for long commands?

I connect to a Slackware server. When a command is longer than the size of the putty window, the line continues in the same line, and the start of the command disappears as I continue adding to the ...
3
votes
2answers
66 views

Changing the date format within a CSV file

I have a program that outputs data in the format date, time,field1,field2,field3,fieldn 12/20/14,08:01:53,318.622,0.93712,21.6867,1.1089 the file has many columns which all need to stay the same ...
1
vote
0answers
32 views

How to configure Atom for Python?

I installed atom-python-run for running python in Atom. But when I installed python extension in VS Code, then a massage came in that pylint not installed. And I clicked in install button. then a ...
19
votes
2answers
28k views

What is the meaning of read -r ?

in order to understand another answer: find / -type d -print0 | while read -r -d ''; do ls -ltr "$dir" | sed '$!d' the first step is to understand the usage of the option -r of the read command. ...
0
votes
2answers
73 views

Why does the command 'source' have that name?

I wonder why a command that executes commands from a file in the current shell is named source. I can't see a relation between run commands in the current shell and the meaning of the english word ...
31
votes
10answers
36k views

Terminal-based spreadsheets and wordprocessor?

Are there any (good) terminal based (ie. runs in a VT, not in GUI/X) spreadsheets or wordprocessors for Unix/Linux? Can anybody remember the name of such programs which were popular before (eg. ...
5
votes
2answers
3k views

Is there a way to use regex expressions to auto-fill filenames in bash?

Assuming I have a directory with files as shown: $ ls file0001.txt file0002.txt file0003.txt file0004.txt file0005.txt someotherfile.txt Lets say I want to run the following command: $ cat file0001....
1
vote
2answers
189 views

Debian 10 — adjust sleep settings via command line

I have a machine that I access only via SSH that I just updated to Debian 10 a couple of days ago. Since the update it seems to be going to sleep when it is inactive. This has never happened with ...
236
votes
24answers
603k 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 ...
32
votes
6answers
54k views

find n most frequent words in a file

I want to find, say, 10 most common word in a text file. Firstly, solution should be optimized for keystrokes (in other words - my time). Secondly, for the performance. Here is what I have so far to ...
0
votes
2answers
1k views

Best way to create table-like CLI display in Bash?

I'm working on a Bash script for massive USB flash memory testing (using f3 under the hood). I need to display a table-like interface with multiple columns and cells. Currently I'm using printf with ...
1
vote
2answers
65 views

How to interpret Unix command?

I have a command which looks like this: cat PGC2.SCZ.1.dat | awk 'NR == 1 || $NF < 0.05/1783' so this part I guess means skip the first line awk 'NR == 1 but what does this refer to? || $NF &...
0
votes
0answers
15 views

GRUB fails to boot arch linux?

I have a problem with my installation of Arch. I had recently uninstalled it as I wanted a clean install. I installed it up to the point of rebooting after installing and configuring GRUB with ...
1
vote
1answer
920 views

Thunderbird operations through the command line

Is there are way to trigger certain Thunderbird operations through the command line? I am in particular looking for a way to: Receive mail (Shift+F5) Filter on a particular tag Can this be done by ...
0
votes
2answers
107 views

Finding the smallest index such that the indexed log file does not exist in a particular directory

Question: Suppose there is a folder with files log1.txt, log2.txt, log3.txt, etc. I would like to find the smallest integer N such that log<N>.txt does not exist. Is there a simple command/way ...
0
votes
5answers
57 views

Putting a command inside awk to merge columns of different files

I have a file.txt for example (it does not have the same number of columns for each row): 1 2 3 4 5 5 6 7 7 7 7 9 10 I have another file (file2.txt) that contains 2 columns a b c d e f ...
5
votes
1answer
6k views

How to submit a job to a specific node using Slurm's sbatch command?

Our nodes are named node001 ... node0xx in our cluster. I wonder, is it possible to submit a job to a specific node using Slurm's sbatch command? If so, can someone post an example code for that?