Questions tagged [command]

One or a set of directives issued in the *nix environment to get information, change the state of something or to execute something. In other words: To gain an objective.

Filter by
Sorted by
Tagged with
-5 votes
1 answer
54 views

What will this command output?

Can someone please explain in detail what the following bash command will output: for i in $(du -kx / | tr -s "\t"""| cut -d""-f2); do echo $i | rev | cut -d"/"-...
user avatar
0 votes
0 answers
20 views

jobs command: How report all the done/finished processes, but at anytime?

About background processes, for simplicity if for example are executed: sleep 300 & sleep 350 & sleep 360 & sleep 400 & sleep 800 & When is executed jobs -l, in the output is ...
user avatar
1 vote
3 answers
320 views

What is a command? [closed]

Clear thinking and clear communication are facilitated when different terms are used to represent different concepts. This is particularly useful when the 2 concepts are very similar but different. We ...
user avatar
  • 336
0 votes
1 answer
36 views

List user and return non zero exit code if the user not in the system

I need to find a user, and the command should exit with a non-zero return code if the user is not in the system. We can do this in bash, but I need this as a line command, not a bash script. Is that ...
user avatar
  • 183
0 votes
0 answers
30 views

How does iw command work?

I have one Intel Wireless-AC 7260 mounted on one Linux device, and one Intel Wireless-AC 9260 mounted on the other Linux device. When I run "iw wlan0 info" command, the Wireless-AC 7260 ...
user avatar
  • 1
0 votes
1 answer
46 views

blocking commands as non-root

This is a very specific request, I am afraid. I am a non-root user at a CentOS Linux 7 machine. The admin team is normally very helpful but there is zero response for that case, unfortunately. So I ...
user avatar
1 vote
1 answer
22 views

What does Session ID mean within the pkill context?

About the pkill command, I know is possible kill processes - for specific scenarios - based through tty[1-6] and pts/[0-N]. I tested and works as expected. Until here all is ok. But now, according ...
user avatar
0 votes
0 answers
17 views

How does Linux create/manage processes assigned through pgid? [duplicate]

I am reading this post: Using job control in the shells About pgid and ppid it indicates: PGID Each process in a process group shares a process group ID (PGID), which is the same as the PID ...
user avatar
0 votes
0 answers
30 views

ShellScript: How to create manually a parent process and their children process? [duplicate]

I am reading this post: Using job control in the shells About ppid it indicates PPID A process that creates a new process is called a parent process; the new process is called a child process. The ...
user avatar
0 votes
1 answer
54 views

How can sed replacement string be a command's output?

Below sed command helps add text Hello to the end of each line of the input <complex_query> | sed "s,$,Hello," Output: myvar1: Hello myvar2: Hello I now wish to have the output of ...
user avatar
  • 297
5 votes
1 answer
57 views

Use MIDI signals for media control

I have a physical MIDI keyboard that also features some control keys, such as "play" and "stop". When pressed, they send the MIDI codes 115 and 116 respectively over the MIDI bus. ...
user avatar
0 votes
6 answers
98 views

How to cut string on last underscore character?

I have list of files like below: [root@ods1 backup]# ls -l total 93892810 -rw-r----- 1 root root 651248 Feb 17 08:34 abc_def_g_17-02-2022.sql -rw------- 1 root root 665248 Mar 23 08:46 bbc_23-03-...
user avatar
0 votes
0 answers
19 views

Linux Bash how to find only xdev links

How can I just find paths (linux find command or another) which are omitted by -xdev option. Meaning looking for a command/script fpr finding links which are pointing to paths on other devices and for ...
user avatar
  • 1
0 votes
1 answer
55 views

How can i get permission to copy files from one folder to another?

So i was trying to copy some files from one folder to another using the cp command, but when tried it gave me this error: debian@OCR-1:/mnt/rootfs/boot$ ls MLO omap3-overo-storm-arbor43c....
user avatar
0 votes
0 answers
50 views

I updated python 3.9 in linux mint 20.3 by default and command line doesn't work, no taskbar

Yesterday I installed Python3.9 in linuxmint-20.3 and I changed by default (before I had python3.8.3), and when I restarted the computer, I could't open the command line, there was no taskbar, and the ...
user avatar
0 votes
0 answers
33 views

Linux command for searching a log

I’m trying to search an Apache log for a specific error, displaying the lines descending with counts. What would be the best way to accomplish this?
user avatar
  • 1
1 vote
1 answer
17 views

Display part of record Linux command [closed]

I need to search an apache log for an error code and when that code is found display only the IP address on that line? Using a Linux command.
user avatar
  • 11
-1 votes
1 answer
243 views

How can I delete a file with spaces and quotes in the name?

How do I delete a file named 1 '2 3' 4 5 in Linux? None of the methods I've used have worked.
user avatar
  • 15
0 votes
1 answer
26 views

Help creating desktop launcher using terminal command

I'm using MX Linux 21 (Debian 11 based OS), I could run this command from terminal, but when I created a launcher with terminal=true, it didn't work, what I'm missing? The command is echo '2-2:1.0' | ...
user avatar
0 votes
1 answer
66 views

fd --exclude all except dir1 dir2

fd searches files and directories, and can be called with except or prune as an option to limit the results. Is there a way to search only for specified directories? I want to use fd, in fzf, and have ...
user avatar
0 votes
0 answers
17 views

SOftLink - Multiple directories map to one

I need to create mapping(link) existing directory structure with a new soft path. I tried creating a soft link but it did not work out the way I expected. On my Unix Box /dir1/dir2/dir3/dir4 Link ...
user avatar
  • 1
0 votes
0 answers
64 views

How to copy data from NAND memory to sd card?

So i need to know how to copy data from nand flash memory to an sd card in my gumstix overo, so i start by knowing if the sd card is available: Texas Instruments X-Loader 1.5.0 (Sep 16 2011 - 12:10:02)...
user avatar
0 votes
2 answers
94 views

How can I copy all files while excluding files with a certain pattern?

I have the following folder and files: . ├── photos │ ├── photo-a │ │ ├── photo-a.meta.json │ │ └── photo-a.json │ ├── photo-b │ │ ├── photo-b.meta.json │ │ └── photo-b.json ... ...
user avatar
  • 103
0 votes
1 answer
26 views

How can I copy the entire command of a process in `glances`?

The command of each process in glances is chopped by default, e.g. /opt/conda/bin/python: trainman-k8s-job-afe4dad6-d612-4564-979a-89a82594674e-rnnpf Uptime: 31 days, 20:...
user avatar
0 votes
0 answers
73 views

Is there any command in Gumstix Overo that allows me to copy from NAND memory to sd card?

So i am trying to copy all the data in the NAND memory of my Gumstix Overo, through this link https://www.gumstix.com/community/support/faq/write-images-flash/ i know that there is a command, nand ...
user avatar
0 votes
3 answers
47 views

How to retrieve the command executed by command substitution for log reports

For Simplicity, consider the following: x=$(java --version) echo "x: $x" It works how expected showing: x: openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment Temurin-...
user avatar
-1 votes
2 answers
35 views

How to define a new command that is a wrapper of an existing command and accepts all original flags?

What I want to do is to make a command that prints some related info if the command is successful. As an example, if I define an alias as alias cd='cd /path/to/destination/ && echo "...
user avatar
  • 131
1 vote
0 answers
39 views

Is there a "hostname -I" alternative that works on most Unix-like systems? [duplicate]

I am writing a Bash script that requires the internal/private IP address. On a Linux system I normally use the hostname -I command. However, this does not work on some other Unix-like systems, most ...
user avatar
  • 45
0 votes
0 answers
30 views

Atomic Simulation Environment - GUI appears on one laptop, but not the other

I'm a student at University using MobaXterm to access a supercomputer cluster, which runs off of a standard UNIX BASH CLI. Within this system, and within the lab I am a member of, there is a piece of ...
user avatar
0 votes
0 answers
32 views

Get output of two or more commands from ssh in batch mode

I am trying to find a solution for this problem. I do execute multiple (2+) commands via ssh in "batch" mode on a remote server and want to separate the output from the commands to parse ...
user avatar
0 votes
1 answer
68 views

Run command after prompt

I created a flirt.sh script which just outputs a random sentence with a random color, and now I want it to be ran every time I enter a command I used trap "~/flirt.sh" DEBUG in .bashrc for ...
user avatar
2 votes
1 answer
37 views

two terminals, one not showing processes

While I have two terminals open, when I run [program name] & in one terminal, why is it that when I then run ps on both terminals, only the one I have used to run the program shows the processes?
user avatar
  • 21
0 votes
1 answer
89 views

What is the mkdict command and what does it do? (It came in distro but has no man page or help)

When using tab completion for mkdir I found a binary existing called mkdict. But I can't find a man page or other details. A Google search only yields info on a python library with this name, but I ...
user avatar
1 vote
1 answer
97 views

find files that were modified between 2 and 5 days ago

I know of this command find . -type f -newermt 2010-10-07 ! -newermt 2014-10-08, which can find the files modified between two dates. But here, the problem is to find files that were modified between ...
user avatar
  • 21
0 votes
1 answer
54 views

How to Rename middle part of multiple files [duplicate]

I have some numeric files like: test01-aaa.txt test02-bbb.txt test03-ccc.txt test04-ddd.txt I need to remove aaa,bbb,ccc,ddd part from the name. what is the best way i can do? I tried with 'rename' ...
user avatar
1 vote
3 answers
152 views

sudo: What command(s) use to know its timeout, time remaining and if the timeout expired?

I know that sudo commandX asks for the user's password and if it is valid it executes commandX as root, until here all is ok. It is mandatory for some commands, such as apt, chown, chmod etc. It has ...
user avatar
-1 votes
1 answer
29 views

How to store a command output as a variable while erroring out if it fails?

I am trying to do an if statement based on a variable that is command, for instance: ssh_location=$(which ssh) My problem is that, I want to store this only if it exists on the system so I can do ...
user avatar
0 votes
1 answer
27 views

Explanation of the following commands executed one after the other

I have these 2 commands being executed one after the other. cat a.log >> b.log rm -r a.log What is exactly happening here? Why is cat being used here? What about the >> sign ? And what is ...
user avatar
0 votes
1 answer
30 views

Extract 'salt' from mcrypt encrypted file

I have some mcrypt(1) encrypted files, doing file on them ici$ file myfile.nc myfile.nc: mcrypt 2.5 encrypted data, algorithm: rijndael-128, keysize: 32 bytes, mode: cbc However, I'd like to extract ...
user avatar
  • 602
0 votes
1 answer
46 views

LFS chapter 5.2. Binutils-2.37 problem

Hi I am currently making LFS and I am in Chapter 5.2. And I am trying to run this command lfs:/mnt/lfs/sources$ tar -xvf binutils-2.36.1.tar.xz But it gave me the following output: tar: binutils-2.36....
user avatar
-1 votes
3 answers
80 views

separating fields not aligned from a pipe delimited file

I have a file which has entries separated by | and tab. #Name Length Bases Coverage Reads RPKM Frags FPKM ENST00000423372.3|ENSG00000237683.5|-|-|AL627309.1-201|AL627309.1|2661|UTR5:1-...
user avatar
1 vote
3 answers
157 views

Automatic SSH prompt input

I'm trying to copy a bunch of RSA keys to multiple servers for a specific user. Whenever I issue the ssh-copy-id command it asks me to confirm by typing "yes", then asks me for the password. ...
user avatar
0 votes
1 answer
56 views

Is there a difference between these two Linux server commands? [duplicate]

When starting, restarting an apache server is there a difference between the following commands? sudo service apache2 restart sudo service apache2 stop sudo service apache2 start AND sudo systemctl ...
user avatar
0 votes
1 answer
110 views

No such file or directory Error while using find or ls -al in unix directory

I am trying to find reason behind this happening and also a solution . When I try to run below command on Unix directory which has around 16 files and also one of the application process which keeps ...
user avatar
1 vote
1 answer
285 views

Linux Mint 20 is booting to Login prompt on command line

I upgraded my Linux Mint to Release 20 Ulyana from Release 18. After the upgrade now my Mint boot to login prompt on command line. I can login fine but i have to type startx on command line to get to ...
user avatar
  • 111
0 votes
3 answers
140 views

How do I delete a pattern in a column using sed command line?

I have a table like this below; "baseMean" "log2FoldChange" "lfcSE" "stat" "pvalue" "padj" "ENSG00000000003.14" 11....
user avatar
0 votes
1 answer
51 views

`type` command inside bash script, is not showing all paths

When I type echo "${PATH}" | tr -s ':' '\n' | nl from inside a bash script and at the terminal I get the same result: 1 /home/nikhil/Documents/Git/Cs/Architecture/bin 2 /home/...
user avatar
  • 1,362
2 votes
1 answer
51 views

When an SSH authorized key is restricted to command how can the command read the parameters in the call?

Say an authorized key is restricted to the command to test parameters, eg command="bin/testparameters" and the ssh call is: ssh user@host 'some parameters which may include other commands' ...
user avatar
  • 6,647
0 votes
0 answers
28 views

Unable to install yum on Ubuntu 20.04.3 LTS [duplicate]

I tried the following with root user but unable to install yum on my cloud server. root@localhost:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 ...
user avatar
  • 297
1 vote
3 answers
66 views

How to get the difference between files

I've found other links on the stackoverflow communities that were similar but they didn't answer my question exactly. I have 2 files with a different number of lines BUT I have them both sorted. My ...
user avatar

1
2 3 4 5
20