Skip to main content

Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Count files in a directories AND create NEW folders based on that number

I have several directories that all have files in them. I want to count the number of files and then create folders based on that count...like this... Main Directory ----->Subdirectory ------->...
Jeramey Beck's user avatar
-5 votes
0 answers
39 views

What is the output of the following ROT13 transformation command? [closed]

The command I'm using is: echo "YRNEAVAT_YVAHK_SHAQNZRAGNYF" | tr '[A-Z]' '[N-ZA-M]' I'm having trouble figuring out the exact output of this command. Could someone explain the process and ...
Jack Harry's user avatar
6 votes
3 answers
638 views

Is there an equivalent of caniuse for commands on posix systems?

I'm thinking about using a callout to the jq in a utility script I'm writing, rather than parsing JSON manually. In order to make the script as portable as possible, I want to know which flavors of ...
Viscountess of the Junkyard's user avatar
0 votes
3 answers
35 views

Play sound after command and also pipe output

I can easily pipe the output of a command like: some_command | less I can also easily play a sound after a command like: echo test; print \\a aplay, beep or others could also be used for sound. ...
Luis's user avatar
  • 101
1 vote
1 answer
81 views

Bash completion after quotation mark

I am experimenting with bash completion to write a general completion library in C associated with command line parsing and stumbled in a behavior for which I can find no documentation. I am using the ...
user1542207's user avatar
-2 votes
1 answer
27 views

Is there a port of the Windows' REN command for Unix-like operating systems? [duplicate]

I already know the "rename" command in GNU/Linux. However, it is very complicated and cumbersome because it uses regular expressions. For example, in Windows, I can simply rename files in ...
TranslucentFoxHuman's user avatar
4 votes
4 answers
984 views

How can one count how many pixels a GIF image has via command line?

I use Ubuntu. I have a large number of GIF images. How can one count how many pixels a GIF image has via command line?
Franck Dernoncourt's user avatar
-4 votes
1 answer
88 views

Find actual file by only file name, not literally everything non-related

PuTTY/SSH and logged in as root I simply want to find any instances of the file PEAR.php. I've looked through a dozen different tutorials but they seem to just copy-paste the same instructions. An ...
John's user avatar
  • 194
0 votes
4 answers
89 views

command-line tool to sum the values in a column of a CSV file

I am looking for a command-line tool to calculate the sum of the values in a specified column of a CSV file. (Update: The CSV file might have quoted fields, so a simple solution just to break on a ...
halloleo's user avatar
  • 589
0 votes
1 answer
45 views

Is there any sort of command-line tool I can use to detect and write metadata for a song's key?

I would like to get into DJing, or at least putting songs together in series and making it work. I have already used bpmwrap to tag the tempo for every song in my library, and it immediately made me ...
Gridzbi Spudvetch's user avatar
0 votes
1 answer
31 views

rpm -qa but filtering for partial package name match?

I'm learning about the rpm package manager command. I figured out how to use rpm -qa however the list exceeds the overflow of the SSH program so I can't see the entire list. How do I use the rpm ...
John's user avatar
  • 194
-1 votes
0 answers
121 views

How to set up public Linux station safely?

On a Linux cloud machine, I want to set up a learning station for beginners (pubnix/pubunix). How can I block all internet except for incoming SSH (ssh user@cloudmachine) and except for SSH local port ...
wjwrpoyob's user avatar
  • 438
0 votes
1 answer
42 views

open vpn - not working but also dont returns any error

i have both open vpn server and client. the client is my windows pc and the server is a ubuntu 22 VPS. im running openvpn on the serverside with this command : openvpn --dev tun --ifconfig 172.16.0.1 ...
ama coder's user avatar
1 vote
0 answers
50 views

Shell: Customizing the "Display all N possibilities? (y or n)" message

I already know that double-pressing the Tab key on Bash terminal will enlist all files and folders in the current working directory or, when appropriate, show Linux executables that I can run. I want ...
groaking's user avatar
-1 votes
2 answers
73 views

How to print out all printable ASCII strings contained in binary data?

How can I print out all printable ASCII strings (e.g., longer than four chars) contained in a binary file? I used strings -a -w file.bin >>output.
minto's user avatar
  • 543
0 votes
2 answers
60 views

command suggestions while typing for beginners

When typing the commands in any shell, can there be any kind of setting that can be enabled for beginners to type just an alphabet and it will suggest multiple commands that the beginner might be ...
Abhishek Dutta's user avatar
1 vote
1 answer
92 views

Shell script to run command and show output in notification box

I have command line utility that generates text strings, by running a command within the directory: ./Utility -P it prints output on terminal. How to make a shell script showing the generated string ...
minto's user avatar
  • 543
-6 votes
1 answer
75 views

Finding difference between two Linux Commands

How to find the difference between rm and rmdir commands in Linux Bash Shell?
Rishabh dixit's user avatar
-1 votes
1 answer
44 views

How can I solve this error in wifislax 4.9

I can't understand why the commands not work please help me
MR. English2008's user avatar
12 votes
2 answers
4k views

Check if current user can run sudo without requiring a password

I want to check if the current user running a BASH shell script has access to passwordless sudo or not. If they don't, I'd rather have the script exit rather than prompting them for a password.
Jay Taylor's user avatar
1 vote
1 answer
27 views

Passing modprobe options through environment

man modprobe says in the ENVIRONMENT section: The MODPROBE_OPTIONS environment variable can also be used to pass arguments to modprobe. But this is unclear. Suppose for example that I want to force ...
q.undertow's user avatar
0 votes
0 answers
83 views

Bash terminal lagging one input behind

After a recent update, I've noticed that working on any terminal for more than a few minutes causes a delay between inputting a keypress and seeing it reflected on the screen. Specifically, if I were ...
Nick Reed's user avatar
  • 163
0 votes
1 answer
70 views

How to delete a directory whose name has special characters

My ./imap directory contains two folders with names containing special characters : ‘No’$‘\351’‘.sbd’ ‘S’$‘\351’‘gol’$‘\350’‘ne.sbd’ (these are the full names with no other characters added). The ...
Josef's user avatar
  • 1
0 votes
1 answer
41 views

getopt with several `--`

I have a script with this usage: myscript [options] positional-args... -- [fwd-params] Because [options] can have long, or short variants, I like using getopt. But I'm having troubles. I use getopt ...
Stewart's user avatar
  • 14.2k
1 vote
1 answer
43 views

Using cryptsetup and mount without sudo

I'm trying to build a CLI to easily manage the backups I have on my hard drives. Currently I use LUKS to encrypt the drives and duplicity to manage the backup process, and I have a simple bash script ...
Nabiu's user avatar
  • 11
1 vote
4 answers
84 views

Zip all files in directory to multiple independent outputs

I am trying to zip all files in a single directory into multiple independent output zip files. What I mean by this is that I do not want to produce a split archive; rather I would like multiple zip ...
CopyOfA's user avatar
  • 123
10 votes
3 answers
2k views

GNU sort command does not sort words of different lengths with common prefixes correctly when using field delimiter

The GNU sort command is not sorting words of different lengths with common prefixes correctly for me, but only when using a field delimiter to sort on one of multiple fields. Here is the correct, ...
Ben McIlwain'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
21 views

apt cache for live build

How can I cache all internet files when building with live-build? lb config --cache true --cache-packages true --cache-indices true does not work (see the last section of the build script and log). ...
wjwrpoyob's user avatar
  • 438
0 votes
0 answers
28 views

Difference in live usb and base

I have booted into the official Debian live USB with debian-live-12.5.0-amd64-gnome.iso. I have changed a few settings (for example, enable touchpad's tap-to-click in system settings and Firefox's ...
wjwrpoyob's user avatar
  • 438
4 votes
1 answer
67 views

Monolingual french offline commandline dictionary?

As the title says, I'm looking for a monolingual french dictionary that I can query on the commandline, ideally offline. For example to have a low latency way to check the gender of nouns. I looked at ...
user313032's user avatar
0 votes
1 answer
78 views

How to use grep string that has double quotes in it

So I'm running a simple alias called vpn which runs a command and has an output, which I put into a .txt file. If interested to what exactly then here is the alias alias vpn="docker exec -it ...
Arelius's user avatar
  • 73
0 votes
2 answers
82 views

How can I compute bcrypt hash with less than 16 (2^4) rounds on Linux?

How can I compute bcrypt hash with less than 16 rounds (cost factor of 4 = 2^4 = 16 rounds) on Linux? This is the same question as Compute bcrypt hash from command line, but requiring a cost factor of ...
wjwrpoyob's user avatar
  • 438
1 vote
1 answer
35 views

Retrieve large number of files from remote server with wildcards

I'm trying to download a large number of files from a remote server. Part of the path is known, but there's a folder name that's randomly generated, so I think I have to use wildcards. The path is ...
Mauricio Chavarriaga's user avatar
-1 votes
2 answers
97 views

Recursively search for txt files that has all the search strings

I want to find all the files that has the words “Who”, “What”, “Why”, “How”, “When”. All of the words, in any order. Case Insensitive I tried: grep -rl --include='*.adoc' "Who" . | xargs ...
Ahmad Ismail's user avatar
  • 2,738
3 votes
1 answer
109 views

udisksctl: get loop device and mount point without resorting to parsing localized output?

udisksctl is my tool of choice when dealing with file system images (recent example, but I've been doing this all over the place). The dance typically looks like fallocate -l ${img_size} filesystem....
Marcus Müller's user avatar
1 vote
1 answer
58 views

List openvswitch virtual switch with ip command

I've configured openvswitch virtual switch and can list it with ip command as follows: # Show all interfaces ip link Output: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN ...
metablaster's user avatar
2 votes
2 answers
96 views

Create FAT-formatted disk image that can fit 1G file

I'm struggling to create a FAT-formatted a disk image that can store a file of known size. In this case, a 1 GiB file. For example: # Create a file that's 1 GiB in size. dd if=/dev/zero iflag=...
jdeanwallace's user avatar
0 votes
1 answer
78 views

process ID of process launched with system command

Suppose I open a shell on ubuntu OS, then open a software such as matlab via matlab & In the matlab GUI, I do a system command system('/path/to/my/cppprog') % <-- PID of this running program? ...
simon's user avatar
  • 101
-1 votes
1 answer
40 views

How to modify the output of $PATH in Linux [closed]

How can I modify the output of $PATH from $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin to $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/...
Shahriar Flamneco's user avatar
5 votes
5 answers
330 views

Is it possible to sort the letters in a word in a line of text?

So I have a file full of test commands that I like to run against some of my functions to make sure they are handling all possible situations correctly. No point in having duplicate commands tho. ...
Ray Andrews's user avatar
  • 2,527
0 votes
3 answers
44 views

Stamp serial / bates number while printing

I want to print 50 copies of the same 16-page document but have a serial number stamped on each one. I'm printing to a Ricoh/Lanier multifunction printer. Right now I print and staple through lpr with ...
Matthew Leingang's user avatar
0 votes
3 answers
163 views

What are the file size options for "find . -size" command?

I found out that to look for file size in bytes, I use 'c'. So I can look for file size with 1000 bytes by using: find . -size 1000c But what about different kind of size such as Mb, Gb or even bits? ...
Mardia's user avatar
  • 119
0 votes
0 answers
12 views

How can I save NIfTI images separated into directories based on protocol name?

In GitHub page dcm2nii DICOM to NIfTI converter (README): … you may want to invoke additional options, for example the call dcm2niix -z y -f %p_%t_%s -o /path/output /path/to/dicom/folder will save ...
HelpNeederStudent's user avatar
3 votes
1 answer
162 views

How to get display to show a pdf properly

When I do: display file.pdf it shows this: I can't resize the little window that it adds but I can remove it by clicking on the x. I can also remove the checkerboard effect that comes from assuming ...
Simd's user avatar
  • 367
2 votes
1 answer
122 views

how to change font size locally in xfce-terminal?

Does anyone know if there's a way to change the font-size in xfce-terminal locally (for just one window), preferably on the command line? It's possible to change it globally (for all terminal windows) ...
jyoung's user avatar
  • 111
0 votes
0 answers
18 views

VirtualBox-Redtat 7.9

I'm using Apple Macbook and I have VirtualBox in it. within my Virtual Box I have RedHat 7.9 I need to make a USB drive that i'm connecting into my MacBook visible into redhat. what is the steps ...
Nawar Alqadhy's user avatar
1 vote
0 answers
66 views

Run a Linux command every 50 microseconds

I am very new to Linux in general, so apologies if this is a ridiculous question. I would like to run a command line every 50 microseconds, I'm not sure if this is even possible. I have tried to ...
Teabelly's user avatar
  • 111
0 votes
0 answers
60 views

encounter with error after running chef-client -zr "recipe[my_cookbook::recipe2]"

[2024-04-13T05:50:25+00:00] WARN: No config file found or specified on command line. Using command line options instead. Starting Chef Infra Client, version 15.0.300 resolving cookbooks for run list: [...
jayesh mali's user avatar
0 votes
0 answers
19 views

How to copy files from Debian PC to MediaBox folders PC use terminal?

Debian 11 (bullseye) and MediaBox (running linux) in local network. MediaBox accessible via SMB protocol and SSL. How to copy files from Debian to MediaBox folders use command line?
minto's user avatar
  • 543

1
2 3 4 5
125