Skip to main content
The 2024 Developer Survey results are live! See the results

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
1 answer
36 views

Get a list of all user's commands from a non-interactive shell

I am writing a script that would automatically suggest some new aliases/functions to be added to a user's shell config. Before doing that, however, I would like to make sure the aliases being ...
zoickx's user avatar
  • 51
1 vote
0 answers
35 views

Why some system cmds would be designed (compiled) as shared object type file?

For similarly, the following system cmds all are the same executable files. So why some system cmds would be designed as shared object type file ? # # # file /usr/bin/passwd /usr/bin/passwd: setuid ...
lylklb's user avatar
  • 365
0 votes
0 answers
16 views

HM encoder , error in running commands

I am new to HM and I am encountering the same issue , which I cant run any command if I am not in its directory (exp: to run encoder_intra_main.cfg I must be in the cfg directory ) I know its from the ...
Ahmad Atwi's user avatar
-1 votes
1 answer
42 views

Single command to delete all files in a folder & the folder itself if it is now empty?

Sometimes I want to delete all the writable files in a folder and delete the folder itself if it is now empty (meaning it did not have any subfolders, and did not have any write-protected files). I ...
End Antisemitic Hate's user avatar
0 votes
0 answers
31 views

du -h only show folders but not files, how to show all?

I don't know what's going on with my centos 7 machine but seems like du -h /path only shows folders, not files, and it's annoying. I want to find all the files and folders at a specific depth and sort ...
Hoang Minh Quang FX15045's user avatar
0 votes
2 answers
41 views

How do I get bash to use a specific directory when running a command?

I have a problem with the handling of the mysql command.  When I try to use mysql -uroot -p, I get an error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) However, when I ...
flix's user avatar
  • 143
0 votes
0 answers
14 views

Shortcuts running privileged commands

Intro: Using ABIs to control fan_speed, fn_lock, or conservation mode can be done with editing files in the (e.g. /sys/bus/platform/.../) directory which is owned by root. For example if i wanted to ...
white-hat-er's user avatar
1 vote
0 answers
96 views

How to work with CPU and memory intensive application in Linux?

This is the scenario,- it is a Java Application mainly, Heap Dump & Thread Dump is not helping me. Maybe I am not wise analyzing it. Observation 1) Lots of memory seems to be utilized. [maddipp1@...
Dev Anand Sadasivam's user avatar
3 votes
3 answers
225 views

How does the d option for the ls command exactly work? [duplicate]

Having the following simple structure: project main aaa aaa test ddd ddd pom.xml <--- unique regular file If the current directory is project and if is executed the ls command ...
Manuel Jordan's user avatar
0 votes
1 answer
312 views

Open terminal in directory open in file explorer

In GNOME, I wish to setup a shortcut to open terminal in presently viewing directory in the gui file explorer. The nautilus gui is opened from terminal by the command xdg-open ., but I'm not sure if I ...
DatBoi's user avatar
  • 101
0 votes
2 answers
83 views

Remove invalid characters from recursive Linux filesystem

I have a huge filesystem full of folders/files using invalid characters. I have found one command that almost does what I want and it came from this thread - https://stackoverflow.com/questions/...
JandP's user avatar
  • 1
0 votes
2 answers
82 views

Counting Files in Remote location using sftp in shell script

Getting Error with the below command to check on the Remote directory a specific type of files. The requirement is to get the count of the specific files. file_exists=$(sftp $FTP_UNAME@$FTP_HOST ls *$...
MALABIKA GARAI's user avatar
0 votes
0 answers
46 views

How to gracefully handle differences in command options between different versions?

Inspired by What is the difference between “base64 -b0” in macOS versions prior to macOS 13 (Ventura) and “base64 -i” in macOS 13 (Ventura)? Are there common ways to avoid the script breaking on a ...
typo's user avatar
  • 229
-2 votes
1 answer
59 views

CSV file with many columns, print each using loop [closed]

I have a CSV file saved on my desktop with many columns. The CSV file has only one row but 195 columns and I have to print each column in Unix using loop command. The path of the file is /home/...
Kinjal Sinha's user avatar
0 votes
1 answer
128 views

On simple filenames as commands versus arguments

I am reading Sobell's A Practical Guide to Linux Commands, Editors, and Shell Programming, 4e, and I am currently starting Chapter 5 on the basics of shells. On page 135 Sobell explains that From the ...
EE18's user avatar
  • 253
0 votes
1 answer
39 views

In Fedora how to launch a webapp from the terminal?

I have installed a webapp (Copilot) using edge in Fedora. I would like to launch the app using a shortcut but I cannot find the command to launch it. I imagine it should be a command launching the ...
akasolace's user avatar
  • 193
0 votes
0 answers
191 views

Deleting a hidden file with linux command

I tried using rm -rf .* command to remove a hidden file and I am met with this error. rm: refusing to remove '.' or '..' directory: skipping '.' rm: refusing to remove '.' or '..' directory: skipping '...
Agbodike Chetam's user avatar
-1 votes
1 answer
76 views

Checking if I'm correct about the order of operations in Bash

Guten Tag! I'm a rookie in everything Bash-related. I'm familiarizing with the syntax and wanted to know if the order of operations in this command is as I thought or not. The command: echo 2 * 3 > ...
elkronequis's user avatar
0 votes
1 answer
75 views

Quote characters work as commands that redirect to the standard input

I am a student and I am trying an excercise that involves assigning a word with quotes, double quotes and other symbols to a file name. The problem is that I am not getting the expected results. I am ...
Daniel's user avatar
  • 11
0 votes
1 answer
41 views

Find file in directories of PATH env which match partially

Idea is to match a filename in any of directories mentioned in PATH environment. Usually, we do this by running "which <executable_filename>". This works fine, when the file your are ...
Sachin's user avatar
  • 3
-1 votes
2 answers
250 views

How does the `tr` command work?

I was playing around with tr and got some unexpected results. What is happening in these situations? I don't understand what is happening under the hood, or perhaps I'm not using this command ...
BadHorsie's user avatar
  • 141
-1 votes
1 answer
42 views

Strange behaviour of type command

I sometimes use the type command to view my codes: $ type squared squared is a function squared () { local t=$(($1*$1)); echo $t } I can do the same with builtin functions: $ type ...
user167612's user avatar
  • 1,702
-4 votes
2 answers
115 views

Command like head except instead of showing output by new line, shows output by space

head example: Desktop: λ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s7s1 113Gi 8.9Gi 8.6Gi 51% 355384 90345720 0% / /dev/disk1s2 ...
Nickotine's user avatar
  • 489
0 votes
2 answers
464 views

sticky bit on files and directories

I've always heard that sticky bit should be only used with directories, and I understand that, but what is the meaning if it is applied to a file. If I set the sticky bit to a file and do an ls -la I ...
std124_lf's user avatar
0 votes
0 answers
25 views

lftp crawl for any newly created files and download them

I have just mirrored a remote webserver using lftp's mirror command. However, the webserver updates regularly with newly created files, although it does not update any already existing ones. How can I ...
Anm's user avatar
  • 113
0 votes
0 answers
21 views

What does "set -- command doas $@" do in my Bash function? [duplicate]

I use this Bash oneliner, set -o errexit;set -o pipefail;set -o nounset;doas() { [[ "${EUID}" == '0' ]]||set -- command doas "${@}";"${@}";} in the head of my scripts in ...
John Smith's user avatar
-1 votes
1 answer
85 views

how can i use 'memusage' command on Centos 7?

When I input memusage command to my terminal on Centos7, it will show bash:memusage: command is not find. How can I use this command?
wwb1's user avatar
  • 21
0 votes
2 answers
128 views

find exec - use only partial filename from {}

I have following directory structure: ├── file1.json ├── file2.json └── file3.json I want to remove the .json suffix. I know the best way would probably be the rename command or to use a for-loop, ...
Bog's user avatar
  • 1,034
-1 votes
1 answer
102 views

COMMAND=list in /var/log/auth.log... does list refer to the ls command?

Basically the title. I've been looking through the authentication logs of a compromised virtual machine (it's just a simulation), and I noticed that after the system accepted the hacker's password, ...
Alexandra's user avatar
  • 111
2 votes
1 answer
122 views

Replacing a character in all files names of a directory

This is homework! I'm trying to replace all spaces in file names with an underscore in the yay directory. It asks me to use the commands xargs and sh without using $(command). I tried using conducts ...
cow's user avatar
  • 81
0 votes
0 answers
92 views

Bash reverse search inserting characters into command after hitting tab

SYSTEM: Ubuntu: 20.04 Kernel: 5.4.0-162-generic bash: 5.0.17(1) I found a strange problem that when I use bash's reverse search with CTRL+r, I will find a command I want to run. I select TAB to ...
Dave's user avatar
  • 621
-5 votes
1 answer
141 views

With what command is possible know the RAM's DDR type, Speed and Frequency by each slot? [duplicate]

For a computer, such as laptop or server used for developing and server purposes respectively and taking in consideration that can't be opened. With what command is possible know the following specs ...
Manuel Jordan's user avatar
1 vote
1 answer
206 views

With what command is possible know the mainboard requirements about the RAM?

For a computer and/or laptop used for developing and as server purposes, of course, it according with the hardware itself. Question With what command is possible know the mainboard requirements about ...
Manuel Jordan's user avatar
4 votes
1 answer
1k views

Command(s) to know If the current RAM installed by slot is ECC/Non-ECC and Buffered/Unbuffered

About RAM for laptops I did realize that is available ECC Non-ECC Buffered Unbuffered It according with: Kingston Technology KVR16LS11/8 8GB 1600MHz DDR3L (PC3-12800) 1.35V Non-ECC CL11 SODIMM ...
Manuel Jordan's user avatar
0 votes
0 answers
84 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
71 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
153 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
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
253 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

TimeZone = 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 ...
Bog's user avatar
  • 1,034
1 vote
1 answer
82 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
154 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
345 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
346 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
2k 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
64 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
278 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
  • 59
0 votes
0 answers
110 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

1
2 3 4 5
22