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
0
votes
0answers
14 views

Run script on multiple servers to list All Users

(new to Linux) We have about 100 servers (CentOS & RH) and we are trying to get details on all users and the last login date. This command will do the needed: lslogins -u -s -o USER,UID,LAST-...
0
votes
0answers
9 views

Unable to set a value with “gsettings set”

when i open a terminal in NX, it is not loading .bash_profile. But when i change the terminal settings, I enabled "run command as a login shell" via Terminal --> edit --> preferences-->under profile,...
0
votes
0answers
16 views

Finding multiple instances of an installed application

I have been combing through all sorts of documentation and I can not seem to find a command to find multiple instances of an application on a Linux system. Can someone please help me?
0
votes
0answers
9 views

screen -md bash -c'python3.6' : it does not work. why?

screen -md bash -c'python3.6' : it does not work. why? no sockets found inj /var/run/screen/S-root. one time I did it and it worked. when I cleared it because there were two sockets and it disrupted ...
0
votes
1answer
66 views

!! bash command

When we run !! in a shell session, it prints and run last executed command I was wonder if it is an alias for another long-written bash built-in command and would like to know where it is defined I ...
0
votes
0answers
28 views

How to make everything run with password

Is there a way to make all commands and all apps run after requesting a password of root so that will increase security Against hackers because no command run without root password?
-5
votes
1answer
62 views

The easiest way to bypass “Permission Denied” by file

Is it possible to get a simple answer please? I need to change Prompt=lts to Prompt=normal in /etc/update-manager/release-upgrades, but it says I don't have root and I am not the owner. I need the ...
0
votes
0answers
20 views

RHEL 7.7 IP manipulating

I redirected connections of unallowed IPs (which are trying to connect to my machine via ssh) to another machine, using port redirection. Now I want to change the output of the commands (ifconfig, ...
-2
votes
1answer
28 views

What is the best method to list all the files of an extension in a directory? [duplicate]

After some research, I ended up with few methods. The most logical one is, muyustan@muyustan-ubuntu:~/Downloads$ find . -name "*.srt" But the output of this command also includes the files on ...
0
votes
0answers
27 views

How to start a call with twinkle using command line

I have twinkle installed and it works with GUI. I want to start a call using the command line, but twinkle -help-cli so not really a help. when I try twinkle -c -f <profile> --call <...
0
votes
2answers
88 views

Historically as well as today, what was or is the commonly accepted default argument for a command to show its help page?

I stumbled upon this the first time when I wanted to add an option -h to my program and got an error that -h is already in use: With add_help=True, Python's argparse automatically creates a help page ...
0
votes
0answers
24 views

What does “\|” means in grep filter? [duplicate]

What does "\|" exactly means in "essid\| channel:\|quality\|address"? iwlist wlan0 scan | grep -i --color "essid\| channel:\|quality\|address"
1
vote
1answer
39 views

connect to ssh and execute command in spite of changing shells after login

I am trying to connect to a server via ssh and then execute a command. So far so simple. The twist is that on that server, I start zsh from my bash. So in my .bashrc I have the command: exec /bin/...
3
votes
2answers
65 views

A man page is available: Why the command generates: bash command not found?

Recently I was reading about techniques of encryption. I found crypt and encrypt commands. When I read man page it displays ok but when I run some examples system displayed message about bash command ...
0
votes
2answers
62 views

Edit script to email output?

I'm basically trying to put two scripts I found online together. The first, in two parts, checks if a directory exists, if not creates it then goes on to take a picture through the webcam if an ...
0
votes
2answers
53 views

How can i store commands as a variables and execute them randomly in bash?

How can i store commands as a variables and execute them randomly in bash? command1=" convert -size 2000x1000 xc:none -gravity center \ -stroke yellow -pointsize 50 -font Courier-BoldOblique -...
0
votes
0answers
128 views

Resource temporarily unavailable

Question Why I'm got this error ?Resource temporarily unavailable How to launch over 10,000 threads with no error? I want to run my code with over 10,000 threads. Steps to reproduce this issue ...
-2
votes
1answer
222 views

How to list all files and directories in current directory, whose Second character is a digit

What command is used to list all files and directories in the current directory, where the second character of its name is a digit. Can we use grep here?
-1
votes
1answer
28 views

Removing files and directories inside an directory

In Unix,How to remove files and directories from the directory named as parent. The parent directory is placed inside grandparent directory.i need to remove only the files and directories inside ...
1
vote
2answers
56 views

Combine two command defined as String in variable and run as one [duplicate]

Can I join two commands defined as String and run as one. E.g. var="ls -alt" var2="| grep usersfile" var3="| grep usersfolder" Following example for joining commands does not work. a. '{$var & ...
0
votes
1answer
25 views

Disk usage command problem

I used du -h hello where hello is a file or directory name. It printed 4.0k hello in output. I don't need the output to contain the .0k part. How can I remove that so that the output is just 4 ...
-1
votes
1answer
135 views

Command to display previous,current,next month of Cal of year 2015 dec

I know how to display the previous, current ,next Month of ongoing current month .but I didn't know for the particular year mentioned...what is the command used in Unix to get the output
0
votes
1answer
41 views

Remove all hidden files

Is there a command that will remove all the hidden files in a directory, including its subdirectories? I need it to only remove the hidden files, not regular ones.
1
vote
1answer
61 views

sg: not found - Alpine Linux

I am trying to execute a command with a specific user group as described in the linked question (How to run a process with a specific group?) on Alpine Linux, but the system says "not found" ~/work $ ...
2
votes
0answers
45 views

How to be certain of running linux command in English?

I'm writing some software that uses the output of some system (linux) commands. Problem is, it fails with languages other than english. Is there a way to run linux commands and be sure that they'...
0
votes
2answers
60 views

Remove unwanted character from a variable

I've seen a few of these questions, and a few answers, but they only tells me how to echo the results to the screen, and often only refers to one character. I need to remove the chars ', and keep ...
0
votes
0answers
20 views

Add new shell directories for find new commands (ubuntu /debian) PERMANENTLY? [duplicate]

I've trying to add the directory "/home/branden/CustomCommands" to shell to able find commands inside the "CustomCommands" directory. The default shell directories: /sbin /usr/bin /usr/local/bin /...
4
votes
2answers
108 views

Run every bash command through a function, or wrapper

So I want any and every command that I run to be piped to another command, and I tried using a .bashrc function: * () { ${@} | [my command] } So for example, what I really wanted to achieve was ...
1
vote
1answer
79 views

Switching between terminals in a shell script

My question is similar to this question. I would like to open multiple terminal windows and execute commands in them by using a shell script. Since I want to monitor data, the terminals need to stay ...
0
votes
1answer
42 views

How much storage is this fio command utilizing?

I have a fio workload running as a Job. Fio workload: --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: fio-target spec: #storageClassName: ocs-storagecluster-cephfs ...
17
votes
1answer
2k views

How can I change a file to a directory? Files lost after find+mv

I had a directory containing some 2000 files. I ran the following command to move those 2000 files into a target directory: find /opt/alfresco \ -type f \( -iname \*.pdf -o -iname \*.xml \) \ ...
0
votes
1answer
35 views

Why can I only run this command in the terminal, and not in startup commands nor in the Run command GUI box?

$(run-parts --list --reverse --regex '^KeePassXC-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]-x86_64\.AppImage' bin | head -n 1) (The purpose of the above command is to run the most recent version of ...
2
votes
0answers
27 views

Toggle capslock with command

I'm trying to enable capslock with a console command, is there a possibility to do so? I found setleds +/-caps but that only works in a non-graphical environment sadly. Any help is appreciated, ...
1
vote
0answers
24 views

time command stdout not working [duplicate]

I ran the time command on Linux and redirected the output to a file time > time.out The above command didn't work. The output time command was displayed on the terminal, the file named 'time.out'...
1
vote
1answer
33 views

Execute a command before rsync --delete-after takes place

What I want to do exactly is to sync the files , execute a command and wait for it to finish , then use the --delete-after option
0
votes
1answer
51 views

Apply multitail's filtering to many files passed via wildcard

multitail has a nice regex-based filtering mechanism that is described in the manpage and online manual. Both sources state that log lines matching a given regex can be excluded from output using the -...
1
vote
3answers
46 views

Find the maximum value of Column3 and print the values of Column1 and 2 only

In Unix, I am trying to find a command that would find the maximum value in Column3 and print the corresponding values from Column2 and Column1 (but not from Column3) in a new file. Column1 ...
3
votes
2answers
153 views

Combinations of different letters in specific positions

In Unix, I am trying to create all possible combinations of these letter at 6 specific positions as follows: Position 1 - A or B or C Position 2 - A or C Position 3 - only C Position 4 - A or D ...
3
votes
3answers
89 views

Make a line blank, by returning everything on that line down in bash

I want to alter a text file. Let's say I have some text on line 22, and I want to make line 22 blank and move down the text on line 22 down to line 23. To illustrate, I want to turn this (printf 'Some ...
2
votes
1answer
58 views

Can I extend a command adding my own aliases?

I created a few aliases to work with nodejs projects such as: alias lsc="cat package.json | jq '.scripts'" to list all the available commands in the scripts portion of the package.json file Ideally ...
1
vote
1answer
52 views

head not returning n lines

When I run the command head -n 445 /etc/snort/snort.conf | nl I expect lines 1-445 to be returned. However, only up to line 371 is returned: [snip] 370 preprocessor dcerpc2_server: default, policy ...
2
votes
1answer
51 views

Consolidate several GraphicsMagick (ImageMagick) commands into one

There are many times I get single page PDFs that I want to convert to JPEGs and crop the excess whitespace off of. Here is the current set of commands I have which accomplishes what I want: gm ...
1
vote
2answers
51 views

Keyboard shortcuts in CLI as aliases or scripts

Is it possible to take a keybind/keyboard shortcut and turn it into a CLI command or integrate that keybind/keyboard shortcut into a script that can then be executed in BASH? I know this would be ...
0
votes
1answer
46 views

Why can certain commands be ran through a variable, while others can't? [duplicate]

So if I put some simple commands into a variable, and then call that variable at the beginning of the line, it actually uses those commands. For example: yes@no:~$ nnn="ls -l Super" yes@no:~$ $nnn -...
0
votes
1answer
20 views

Dovecot add existent folder from command line

I've insert a .INBOX.test folder in my mailbox folder /home/user/Maildir but I dont see it from Thunderbird. What i have to do for see it?! Thanks
0
votes
1answer
104 views

how open file system's GUI-window through terminal

is there any shell command that open file system's GUI-window of the terminal's current working directory?
3
votes
2answers
148 views

c1-c2 regular expression in sed and grep

I'm trying to understand what the expression [c1-c2] does when used with sed or grep: grep -E "[c1-c2]" This matches 1-9 and a, b, c. As I understand it, it should match the characters between 1 and ...
0
votes
0answers
19 views

How is it possible to call CwRsync.exe via a Bash Script with variables and arguments?

This is the commandline currently used to call Rsync that's part of Cygwin 64 install. rsync -aqHPR $CygSrcRoot/./$FolA1 $CygSrcRoot/./iMazing.Versions/Versions/$FolA1 $CygDstRoot/$DstCountFol --...
2
votes
3answers
101 views

Setting an environment variable on the command line and making it affect two commands

This command works as expected > TEST=`uuidgen` sh -c 'echo "$TEST"' BE6DFB7B-D872-49D7-91E6-24D01644B0A2 > echo $TEST [empty line] It sets the TEST variable locally on the command line and it ...
3
votes
3answers
61 views

Calculating how many sub directories and files in 'documents/'

I'm learning Linux through a gameshell. Like the title says; I need to find the amount of sub directories and files in 'documents/'. The command runs fine but its the not the right answer. Here's my ...

1
2 3 4 5
16