The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
3k views

How to login to SFTP server using pem file which have password?

I have given below details of an SFTP server to login. ipaddress, username, password, port(8800), password protected ppk file. I tried the following command to login to server but unable to connect.(...
2
votes
5answers
104 views

Filtering CSV dataset to find rows and store them in text file

I'm new to shell commands. I'm kinda struggling with this question based on a CSV dataset fbnews.csv. The CSV dataset looks like this: D,E,F, message, score, A,B,C, ID d,e,f, ...
0
votes
0answers
54 views

Want to turn off “note” level messages in GCC

When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note. The note messages are useless and distracting. How do I make them go ...
0
votes
0answers
10 views

Installing Linux-3.19 API Headers in LFS giving error

I am on chapter 6 of LFS and it is giving such error. Please help me figure out what i am doing wrong.P.S i have entered chroot.
0
votes
3answers
69 views

Piping ls to grep. Why does grep disregard the output from the ls command?

I am trying to use this command ls -p | egrep "\<[A-Z]+\>" to print all uppercase file and dir names with dir names having / appended. I do not understand why my command works even though I said ...
0
votes
0answers
25 views

How to automatically deactive a linux kernel module after kernel panic?

I need to connect the Linux kernel module in such a way that if a kernel panic occurs the module would not be active after rebooting. Probably I am looking for tricky way with modprobe/instmod ...
1
vote
1answer
10 views

I cannot execute trimmomatic on ubuntu

mohammad@abbasi ~/NGS/Data/RESULTS/TR $ java -jar ~/NGS/programs/Trimmomatic-0.39/trimmomatic-0.39.jar PE DRR000001_1.fastq DRR000001_2.fastq -baseout GgG.fastq HEADCROP:15 LEADING:30 TRAILING:30 ...
0
votes
0answers
12 views

Why does it appear group::r-x #effective:r— in the setfacl\getfacl command?

I'm changing the question because I believe I understood the command setfacl -d, but can't understand the following. In the example bellow, I set "rw" permissions to user "dummy" for the directory "...
8
votes
3answers
28k views

tar: short read

I get an error when I uncompress my tar. I do this: tar xvf VM_DECOMPTES.tar and after some time I get the following error: tar: short read What is going wrong here? tar: unrecognized option `...
4
votes
2answers
1k views

Jingle CLI client / Jitsi replacement / VOIP

I am looking for a Jingle client for the command line. Currently, I use Jitsi, but my dreams of not needing the GUI for more than just web-browsing are not realized due to my reliance on this program....
1
vote
3answers
28 views

uniq cluster name

We have several clustered servers and need to check 1 server in each cluster. How do I compare entries in a list to return only one server in each cluster? All server names follow [a-z]-[a-z]-[a-z][0-...
3
votes
2answers
71 views
+50

How to show only processes which consume more than certain % of memory using htop

Is there a way to show the processes using htop which consume say > 10% or CPU? I am a bit overwhelmed by the huge swaths of information.
10
votes
2answers
48k views

How to open any file through the command line?

I would like to know if there is a command to open any file in Linux independently of their extension, just as if you were double-clicking it.
4
votes
4answers
326 views

How can I adjust nth number in a line?

File contents: RANDOM TEXT num1=400 num2=15 RANDOM TEXT RANDOM TEXT num1=300 num2=10 RANDOM TEXT RANDOM TEXT num1=200 num2=5 RANDOM TEXT I would like to subtract 5 for ...
10
votes
3answers
5k views

How do I take a list and remove it from a file?

I have a long list of domain names that I need to remove from /etc/remotedomains. They're probably not in any particular order in the file. Each domain is on one line. How could I iterate through the ...
0
votes
0answers
10 views

Failed loading Zend extension 'opcache.so'

I got issue with many commands. For example : I write php -v command and it gives error like this see below : PHP Warning: Failed loading Zend extension 'opcache.so' (tried: ext/opcache.so (ext/...
45
votes
8answers
23k views

Isn't less just more?

When I do more filename and less filename, it would seem that the resulting terminals are quite similar. I can navigate and search through my files identically (j, Space, /pattern, etc.). I find it ...
162
votes
17answers
240k views

Efficiently delete large directory containing thousands of files

We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files. There are so many files that performing rm -rf returns an error and instead what we need to do is something ...
0
votes
1answer
32 views

How do I change the login screen in Arch linux?

Well, I currently installed Arch Linux with the Desktop Enviroment KDE Plasma 5. But I don`t like the Login screen, so I want to change it. I installed the display-manager sddm. Does anyone know how ...
283
votes
10answers
160k views

How can I find broken symlinks

Is there a way to find all symbolic links that don't point anywere? find ./ -type l will give me all symbolic links, but makes no distinction between links that go somewhere and links that don't. ...
0
votes
1answer
24 views

Globbing and find command. Difference between encapsulating globbing in “ ” and not [duplicate]

Why does find . -name "*.jav" work while find . -name *.jav does not work if there are more than 1 .jav files? What do the " " do and why is the "*.jav" not interpreted as a literal string?
0
votes
2answers
21 views

extglob behavior, particularly when using *(patternList) in bash

I am trying to use extglob, however, after the man pages I'm confused about how *(patternList) operates. Assume I use the following commands: touch A Ax Axxx Axxxx Ay X X.bak x xx xxxx ls ...
0
votes
0answers
44 views

Want the terminal output (stderr and stdout) of the previous command executed in terminal

I'm trying to store both stdout and stderr from the terminal (and if possible stdin given by user) in a file for every command. So I started creating a trap function to execute every command in an ...
20
votes
6answers
12k views

Any options to replace GNU coreutils on Linux?

I've been thinking about discontinuing the use of GNU Coreutils on my Linux systems, but to be honest, unlike many other GNU components, I can't think of any alternatives (on Linux). What alternatives ...
1
vote
3answers
66 views

Trying to write a script to find ORF from 6 different frames

So basically, you have a sequence, say AAAGCATATGCTAGCCCGTATAGCGATACTAGCTATACGATATATATGATCAATGCCCGTATAG You need to find all the 'ORFs' in the sequence, an ORF is any region that starts with ATG ...
0
votes
1answer
33 views

zsh with vi-mode: How to keep a command line for future use without executing

It happens quite often to me, that while entering a complex command I realize that I need to enter some other commands first. Being a vi user, I'd love to 0 D, enter a different command and later ...
10
votes
2answers
52k views

How to round floating point numbers in shell?

How do I correctly round IEEE 754 floating point numbers on the command line? I want to specify the precision of the output number - the count of fractional digits. Rounding 6.66 to precision 1 ...
7
votes
1answer
10k views

Cannot remove iwlwifi module, even though interface is down

When I run the following two commands, the first one returns without eror, but the second one gives me FATAL: Module iwlwifi is in use. sudo ifconfig wlan0 down sudo modprobe -r iwlwifi If bringing ...
208
votes
9answers
161k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
1
vote
2answers
21 views

How to invert 'watch -b'?

I'm trying to get my terminal to alert me with a simple bell once my domain registration has finished (is resolvable). From watch --help: Options: -b, --beep beep if command has a ...
0
votes
1answer
19 views

Failed to build setup.py on Arch Linux

I currently installed Arch Linux and I want to install the wxPython module for Spyder3. I had problems installing it with pip. Therefore, I downloaded the wxpython tarball. Here are the steps which I ...
27
votes
4answers
56k views

Encode with ffmpeg using avi to mp4

What command lines to use to convert from avi to mp4, but without destroying the framesize and making the file small as the original size or a little bit bigger, and same thing with mp4 to avi? ...
0
votes
1answer
22 views

How to automate selections when installing via CLI

I'm installing Nvidia drivers and have to click through screens like this (not this specific screen, but this is the installer and has some OK and some Yes/No questions during install): Is there a ...
1
vote
1answer
60 views

How to resolve Argument too long

I am new to shell scripting. I am modifying an existing shell script in which I have to create a dynamic html content and assign that content in a variable and use this variable value to replace in a ...
2
votes
1answer
908 views

How to resize at the beginning/move a btrfs partition on the command line?

I have a Linux/Windows dual boot setup on my notebook, in which I used to keep most of the data on the Windows partition to be able to access it from both systems. Since I almost never use Windows I ...
1
vote
2answers
49 views

Delete column if all entries after the header are a certain string

I have a file of data that looks like this Sample1 Sample2 Sample3 Sample4 Sample5 Sample6 ./. ./. ./. ./. ./. ./. ./. ./. ./. ./. A/G ./. ./. ./. ...
0
votes
1answer
37 views

Whats the equivalent of the Linux Alt + '.' on MacOS?

I am trying to get the same functionality as on a Linux where the last argument can be inserted into a another command easily.
3
votes
1answer
344 views

Open a program (VLC) and move it to the foreground

On a Mac, specifically, when I use the VLC command line to open a video file, it opens in the background by default. How can I instead move it to the foreground whenever I run the command to open a ...
0
votes
2answers
5k views

'ss' command for checking sockets not found

I get an error when I try to execute this command on Red Hat Linux. $ ss -s -bash: ss: command not found It is supposed to be for checking socket statistics. How do I execute this?
0
votes
0answers
24 views

How to lock or hide a configuration file?

I am using dxcli to get and put files to dropbox. I do not sync files regularly so I want to be logged out most of the time. To login requires a web browser to complete oauth which is not very cli ...
-1
votes
0answers
35 views

I'm trying to execute a script and I need to replace hostname with actual IP address

I'm trying to execute a script and I need to replace hostname with actual IP address. when I gave ip_address=$'hostname -i' I got the actual IP address. but when I tried sudo sed -i 's/...
0
votes
2answers
35 views

Script to detect mouse clicks like a screen saver while ignoring mouse movement

Would like to disconnect an nic after a minute of user inactivity, where inactivity is defined as no mouse clicks or wheel scrolls. Mouse movement is to be ignored so xscreensaver is not suitable and ...
0
votes
0answers
26 views

How to find out, which screen is HEAD-0, HEAD-1, etc.?

If I want to use the name of my primary screen (HDMI-0, found out via xrandr) within another command, the device is never found. Instead I have to use the name HEAD-0. From what I've already read I ...
1
vote
2answers
587 views

What does these commands do?

I am using these commands in Linux Kali but I keep getting an error when I run the second command: "No such file or directory found." end=7gb read start _ < <(du -bcm kali-linux-1.0.8.amd64.iso ...
1
vote
1answer
911 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 ...
2
votes
1answer
60 views

any way to make this command chain shorter or better

I am using this command chain to filter out bot/crawler traffic and ban the ip addresses. Is there any way i can make this command chain more efficient? sudo awk -F' - |\\"' '{print $1, $7}' access....
0
votes
1answer
39 views

Need an “at” Command Timestamp That Runs Command Monthly at Given Day

Need an at command timestamp that run some command at given day monthly, like for example, every day 15, as would follow: $ at every 15 day So that on every day 15, it would run some command. How ...
1
vote
2answers
38 views

How can I do an if conditional for a failure of a bash command?

I'd like to have a very simple condition that will only execute if the command fails. In this example it's a conditional based on the SUCCESS of the command. if command ; then echo "Command ...
21
votes
8answers
69k views

How to find a file from any directory

I'm trying to look for a file called Book1. In my test I'm trying to look for the aforementioned file and in this test, I don't know where that file is located. I tried find / -iname book1 but there ...
67
votes
9answers
38k views

Split pages in pdf

I have a scanned pdf file which has scanned two pages on one virtual page (page in pdf file). The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the ...