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
0 answers
49 views

Is there any command for PRINT command in Linux just like UNIX

I know the pr command and lpr on Unix. Is it also the same as that of Linux?
Ariori Abdulrafiu Olayemi 's user avatar
0 votes
1 answer
34 views

When is useful use "silent" for tty?

If the tty --help command is executed it shows tty --help Usage: tty [OPTION]... Print the file name of the terminal connected to standard input. -s, --silent, --quiet print nothing, only return ...
Manuel Jordan's user avatar
0 votes
0 answers
18 views

Use environment variables in terminator config

I want to launch terminator with multiple terminals with some starting on a different directory. The directories could change based on the $USER on different systems but I have them defined in .bashrc ...
silent_monk's user avatar
-1 votes
0 answers
29 views

How does "." work exactly when the path directory is included and not included to execute a script file? [duplicate]

Suppose the following structure / snap bin notepadpp <--- file If pwd returns /snap/bin/ to execute the script happens the following: a: ./notepadpp the execution works b: notepadpp the ...
Manuel Jordan's user avatar
21 votes
4 answers
5k views

What are Non-GNU versions of terminal commands?

I thought GNU was the (only) supplier of essential tools whose open-source code powers Linux distributions. However while browsing unix.se, I saw some questions that explicitly state they are dealing ...
eyhy84394's user avatar
  • 235
0 votes
0 answers
61 views

How can I check with a command line tool if a file exists on a remote FTP server?

There is an FTP server where there is a directory in which images reside. There are numerous images (approximately 10000 images). When I try to check it with Total Commander, for example, it cannot ...
Tamás Bern's user avatar
16 votes
4 answers
3k views

date - Can't Go Back More Than 115 Years or Can't Go 5879565 Years Into the Future

TZ=CEST, date (GNU coreutils) 8.32: date -d "115 years ago" Di 11. Aug 13:37:54 CET 1908 date -d "116 years ago" date: invalid date ‘116 years ago’ Questions Is it possible to ...
Pixelbog's user avatar
  • 540
0 votes
1 answer
25 views

Could someone explain when I would use sync -d over sync with no options?

I'm looking at an online man page for the sync command and I can't quite figure out the intended use of the -d or --data option. Is it faster? Does it have any noticeable effect? Or is it something ...
Husky2490's user avatar
3 votes
1 answer
79 views

Is there a tool to test if a date-time is in a given range?

I need to develop a script to test if "now" (e.g. the output of date) is in a given range. For now, this range is expected to be a list of days of month (e.g. 10,11,12,13,21,22,23). And I ...
Juh_'s user avatar
  • 133
0 votes
0 answers
59 views

command not found, while it exist in appropriate place

i had fresh installed debian 12 and almost all commands are not found. root@debian:/# dpkg-reconfigure keyboard-configuration bash: dpkg-reconfigure: command not found i find it here root@debian:/...
ant's user avatar
  • 29
0 votes
0 answers
22 views

How to register a ELF file as a command? [duplicate]

So I am trying to study assembly and there is a assembler that is given by a ELF file that can be simply downloaded in a zip file, but to execute this ELF file I find myself needing to put the entire ...
Felipe Dilho's user avatar
0 votes
0 answers
56 views

My system can't find command, though I can find it manually [duplicate]

When I had enter any command (grub, parted, gparted, fdisk) my system cannot find it, although it is present on a disk, because the distribution has installed and works. But when I invoke any command, ...
ant's user avatar
  • 29
0 votes
3 answers
78 views

How to keep permission for migrating Files and Directories from one linux to another

I need to migrate files and directories from one machine to another using tar. I would like to use tar or something similar. But I don't have a root permission. As far as I know "To extract file ...
SBMVNO's user avatar
  • 103
9 votes
1 answer
1k views

What does >&- do in a unix / linux terminal?

I'm not too knowledgeable in the Unix command line. I found this SO answer for using the tee command without outputting to stdout, by "closing stdout" with >&- like this: echo 'hello ...
Oneechan69's user avatar
0 votes
1 answer
56 views

Command to know if electricity went down? or to trigger an action when power electricity went out?

I have an old laptop where the battery passed away - because is not possible buy a new or certificated compatible battery, it because the model is about 10 years ago - therefore when the power ...
Manuel Jordan's user avatar
0 votes
1 answer
95 views

Checking if a script is running in the screen remotely

I want to check whether the script test.sh is running or not in the screen(GNU screen) named testscreen. Need to do this job for many servers, so, want to do through ssh remotely. for serverid in {1.....
Hardguy's user avatar
  • 49
0 votes
0 answers
70 views

Is there a Linux command that can indicate if the mobo is functional to charge a battery or not?

I have a Toshiba Satellite L845-SP4146KL - it currently has Linux Ubuntu 22.04 installed. The original battery passed away, I tried to buy a compatible/equivalent battery - but it is not certified. ...
Manuel Jordan's user avatar
2 votes
1 answer
321 views

How do I trace a Linux command in terminal to see which files it uses as it executes?

I want to know what files, system and non-system files, a command uses as it is being run.
CuriousPanda's user avatar
1 vote
1 answer
344 views

Running the "command" command as root using "sudo"

How to execute the Bash command command using sudo in order to run it as root? Using sudo command fails: $ sudo command ls sudo: command: command not found
user avatar
12 votes
2 answers
3k views

Does ssh run commands (rather than shell itself) in a login shell?

According to man sshd: LOGIN PROCESS When a user successfully logs in, sshd does the following: <...> 9. Runs user's shell or command. All commands are run under ...
Anthony's user avatar
  • 567
3 votes
1 answer
482 views

Use dd to copy partitiions of sda to a file on sdb

How do I use dd to copy the first 2 partitiions of /dev/sda (windows reserved, window7) to a file on /Dev/sdb? I think I can cd to /media/sam/1TB-NTFS/{ a folder I create } and run dd from there: dd ...
user256282's user avatar
0 votes
1 answer
53 views

Is `command -v program` always executable?

I am using the command -v "program" >/dev/null 2>&1 construct if I need to POSIX-ly find out if such program is installed in an if-statement. From its help page is not clear, ...
Vlastimil Burián's user avatar
0 votes
1 answer
267 views

Linux Sleep Command - Sleep less than 1 ms

How can I sleep less than 0.001s / 1ms? If I use this, it shows me that is is only sleeping for 1ms. Is it possible to sleep less? $ time sleep 0.00001 sleep 0.00001 0,00s user 0,00s system 79% cpu 0,...
Pixelbog's user avatar
  • 540
0 votes
4 answers
544 views

Shell script to list all files in a folder on a single line

I have this folder structure: /Brand/ProductCode01 /Brand/ProductCode02 Each ProductCode## folder contains many JPG files, like image01.jpg, image02.jpg and so on I need to create a file that ...
Cesare Rossi's user avatar
0 votes
1 answer
337 views

Write directories, subdirectories and file names to .txt file

I am looking for a command that will write the names of all directories, subdirectories and file names to a text file. Example format: directory1 |_subdirectory1 | |_filename1.mp4 |_subdirectory2 | |...
linuxuser24569's user avatar
-1 votes
2 answers
83 views

Why can I not use find + awk to find the largest file in the filesystem?

Why does this not work? find / -ls 2>/dev/null | awk '$7 > max {max = $7}; END {print max}' This does work: find / -printf "%s\n" 2>/dev/null | sort -nr |head -n1 In the first one, $...
enoopreuse22's user avatar
0 votes
1 answer
125 views

How to list only the aliases defined by the user?

I'm using the ZSH and defined some aliases (stored in multiple fines, that are loaded in the ~/.zshrc). That is working fine. Executing the command alias allows to list all available aliases. Now I'd ...
automatix's user avatar
  • 189
0 votes
0 answers
38 views

Calling, Running or invoking a command, is there a difference? - Terminology

Over the past few months I've read and heard multiple different terms for running a command and as I'm currently writing my own guides/documentation for my projects, I was wondering if there is a ...
fabestah's user avatar
5 votes
2 answers
592 views

How to execute command after every failed command?

I am trying to log every time a command fails (by sending an HTTP request to my VPS) to see how many times I have messed up. I've tried: some_command || curl <my-vps>. Is there a better way?
TheHolyTachanka's user avatar
0 votes
1 answer
32 views

Listing filenames that contain, but does not begin or end with a certain character sequence

I want to list all filenames that include "2022" but exclude those that begin with it or end with it. What commands would work for this?
Alee's user avatar
  • 1
0 votes
0 answers
32 views

Find command in Linux with -print flag [duplicate]

I was reading different flags of find command in Linux when I saw here (#7) the following command: find . -type f -perm 0777 -print I checked the man page of find command but still cannot figure out ...
amirmg's user avatar
  • 1
1 vote
1 answer
23 views

install --compare is said to, in some cases, not modify the destination at all - but in which cases?

The man page for install describes the --compare option like so: -C, --compare compare each pair of source and destination files, and in some cases, do not modify ...
not2savvy's user avatar
  • 225
-1 votes
1 answer
47 views

REQUEST: Appending {number} to end of file upon transfer

I have thousands of directories, within each directory is a subdirectory with a file called file.jpg. Since each subdirectory has a file called file.jpg I cannot transfer all those files into the same ...
linuxuser24569's user avatar
0 votes
1 answer
137 views

Creating & debug of a bash script menu

I've tried a first time with sh like I refer to in my other post here. I'm trying to run a bash script menu to run from terminal only. #!/bin/bash HEIGHT=800 WIDTH=600 CHOICE_HEIGHT=8 BACKTITLE="...
user avatar
0 votes
1 answer
66 views

How to create custom math command in Unix/Linux?

So, I want to make a factorial command for the linux terminal, and I want to be able to run it like this: $ factorial 5 120 However, when I look at questions about this, I only see commands that runs ...
ProgrammerInProgress's user avatar
4 votes
2 answers
974 views

How to print the failed command that caused the script's failure?

I'm using the -e flag. Usage: #!/bin/bash -e Explained: -e Exit immediately if a simple command (see SHELL GRAMMAR above) exits with a non-zero status When a command in the script fails, the ...
AlikElzin-kilaka's user avatar
0 votes
1 answer
60 views

How to pipe output of a command to another command (which does not take a file as input?) [duplicate]

What I want Simplified command: echo "helloworld" | echo $1 I know, this would be possible with cat, but what if a command like echo does not take a file as input? My actual command: ls -...
Pixelbog's user avatar
  • 540
0 votes
1 answer
399 views

How to create a script that takes screenshots of all pages of a given PDF file

I want to create a script that takes a PDF file as input and takes a screenshot of every single page in actual size(100%). So it would look like this: custom_pdfcapture example.PDF After execution the ...
efac793's user avatar
0 votes
2 answers
75 views

Understanding command update-os

I'm new to linux based devices... I have that device which firmware need to be updated using command update-os When i type this command it gives me a hint on how to use it... Update-os [--dry-run] ...
Ammar Mostafa's user avatar
0 votes
1 answer
64 views

Get service name on some old Linux OS

# cat /etc/system-release CloudLinux Server release 6.<...> # systemctl -bash: systemctl: command not found # service --status-all <service description> is running <some service ...
Liviu's user avatar
  • 105
-2 votes
1 answer
361 views

What does sed 's/$/END/g' do?

I'm trying to work out what the command sed 's/$/END/g' 2011.txt>2011.chr.txt does.
Lucy's user avatar
  • 11
5 votes
1 answer
563 views

'which' is unable to find command even though it is definitely installed

I have recently installed the cryptsetup. I've double checked with sudo apt-get install cryptsetup. Reading package lists... Done Building dependency tree... Done Reading state information... Done ...
rful7877's user avatar
1 vote
1 answer
639 views

systemctl: unrecognized option '--value'

I am using the systemctl command to fetch only the value of a property. And executing the below command: systemctl show -p ActiveState --value servicename I'm getting this error: systemctl: ...
user8059388's user avatar
3 votes
0 answers
131 views

I want to hide the output when I type in the make command in the terminal

So I'm on Linux and I've been tinkering around with cs50. I've figured out a way to emulate the make command that is used in the course. When I type this make command, a line will print that I would ...
JackChan20's user avatar
3 votes
3 answers
1k views

xargs treat multiple lines as arguments to single command invocation

I am having a hard time print a seq of number, and then appending something at the end. seq 1 3 | xargs -I {} echo {} 4 results in 1 4 2 4 3 4 However I want the result to be 1 2 3 4 Since I am ...
infoclogged's user avatar
0 votes
1 answer
86 views

Make (`ocrmypdf`) command run in terminal AND include input name in that of the output

I have this line inside a Dolphin service-menu file that contains many other commands for PDF processing: Exec=bash -c 'f="%u"; ocrmypdf "$f" "${f%.pdf}_ocr.pdf";' It ...
cipricus's user avatar
  • 1,386
0 votes
1 answer
159 views

Output text file contents (/proc/interrupts) as they change [duplicate]

Is there some command I can use to monitor changes in /proc/interrupt? For example, using head -4 I can see that the file is changing, but only if I run head again and again: > head -4 /proc/...
emacs drives me nuts's user avatar
1 vote
0 answers
37 views

Linux "ls -sh" command error in (corrupt?) folder print outs many blank spaces?

I am working with some disorganized data on a server. For a couple of the folders when I use the command: ls -sh To list files and file sizes, the seems to be an error where the cursor starts ...
Visio1288's user avatar
  • 113
1 vote
1 answer
733 views

How do I query a repo and find out its content?

How would I find out more information about a repo within RHEL? For instance, I would like to know what packages it holds, as well as information on size, its description/purpose, etc. I know that you ...
Falcun's user avatar
  • 11
0 votes
1 answer
270 views

What's the difference between repo id and repo name on RPM based distributions?

When I run yum repolist all on a Red Hat system, it lists both a "repo ID" and "repo name". I'm confused as to how a single repository has multiple IDs. Is it because a repository ...
Falcun's user avatar
  • 11

1
2 3 4 5
21