Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Creating a compressed image of an exFAT USB drive using dd

My system is running Ubuntu 22.04.3 LTS. I plug a USB drive into that system. That USB drive (/dev/sdb) contains an Ubuntu installation, mostly in an ext4 partition (/dev/sdb3). That installation ...
Ray Woodcock's user avatar
0 votes
0 answers
59 views

Per-user cumulative CPU time across reboots

I have installed the process accounting package (acct) and recorded data. Using sa --print-seconds --user-summary | grep "$USER", I get the process account summary for my user: wjwrpoyob ...
wjwrpoyob's user avatar
  • 376
0 votes
1 answer
14 views

How to restore the last trashed file using a non-interactive command?

Say I just moved a file to trash from a file manager or using a command-line implementation such as kioclient move my_file trash:/. Can I restore it with a single, non-interactive command? trash-cli ...
Nahoj's user avatar
  • 101
-1 votes
2 answers
70 views

Hard link linux [duplicate]

The Linux Command Line William Shotts Page 33 [me@linuxbox playground] $ ls -1 total 16 drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir1 drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir2 -rw-r—r— 4 me ...
Guilherme Woolley's user avatar
-1 votes
1 answer
58 views

creating hard links Linux question [duplicate]

From the book The Linux Command Line by William Shotts, page 33: So now we have four instances of the file fun. Let's take a look at our playground directory. [me@linuxbox playground]$ ls -1 total 16 ...
Guilherme Woolley'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
2 answers
29 views

How to know what is the current tab - number or position - for any Window Terminal?

For Ubuntu and Fedora if is opened a Window Terminal through ctrl + alt + t then is possible open a new tab through shift + ctrl + t. Suppose exists a Window Terminal with 5 tabs. If possible go to ...
Manuel Jordan's user avatar
0 votes
0 answers
20 views

Looking for a config file in fedora (33) where the basic terminal parameters for a CLI login are stored

I am running a Fedora 33 server instance in Virtualbox with login at the command line. (No xserver) Within the virtualbox CLI display for this server, I want to find out if there is any way to expand ...
donaldD's user avatar
1 vote
0 answers
22 views

"Access Denied user root error code 1045 (28000)" after changing root passwords

I'm encountering an "Access Denied user root error code 1045 (28000)" error with user root. I'm facing this problem after changing passwords. It was working fine before, and I'm confused ...
Mushtaq Ahmad's user avatar
0 votes
1 answer
40 views

Keep getting NS record query failed: NXDOMAIN on Kali Linux dnsenum commands

the URL does not matter seeing as I have changed it to different websites multiple times I am new to Kali and Linux in general ┌──(admin㉿LAPTOP-JCHDG93R)-[~] └─$ dnsenum --noreverse -o mydomain.xml ...
greog's user avatar
  • 1
0 votes
0 answers
37 views

What is a CLI helper/wrapper that allows a dumb CLI program to have a command history? [duplicate]

Many years ago I came across a simple utility that would handle the keyboard interaction for any CLI-based program that did not support command history. This tool would keep track of the commands you ...
Paperclip Bob'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
-1 votes
0 answers
34 views

Ho to create an unsigned CSR in Linux command line?

I am trying to follow this procedure in Wikipedia on how to generate a Certificate Signing Request: Before creating a CSR for an X.509 certificate, the applicant first generates a key pair, keeping ...
JLC's user avatar
  • 135
1 vote
0 answers
33 views

Command to open directly "download new plasma widgets"

Widgets are an essential part of Plasma/KDE, and I have always found rather odd and cumbersome the way of accessing the interface to install them, by right-clicking the panel or the desktop, ...
cipricus's user avatar
  • 1,364
0 votes
2 answers
16 views

How to open a file starting with dash via xdg-open

Usually, a double dash separates options from filenames, but xdg-open does not care: ❯ xdg-open -headlinesAfter.epub xdg-open: unexpected option '-headlinesAfter.epub' Try 'xdg-open --help' for more ...
xeruf's user avatar
  • 501
0 votes
1 answer
53 views

How to resize partition in-between other partitions (CLI)?

How can I resize some partitions on a disk where there are other partitions before and after it? I've found plenty of guides on the Internet about how to resize a partition (eg with parted), but they ...
Michael Altfield's user avatar
0 votes
1 answer
36 views

How to tell convert command to skip a page in pdf?

I want to split a PDF page because it scanned two page at the time and I found this useful command: convert in.pdf -crop 50%x0 +repage -density 400 out.pdf But now I want this command to skip ...
malloc's user avatar
  • 135
0 votes
0 answers
14 views

Tool to show memory that would be freed if I terminate a process and its sub processes?

I know that it's a bit tricky to show the memory that a process is using due to the fact that there is memory shared. But when I look at memory diagnostics, it's normally because my memory is getting ...
Peter T.'s user avatar
  • 123
-1 votes
2 answers
94 views

Why pipe keep sudo and redirection not? [duplicate]

Pipe (|) and redirections (<, <<, >, >>) both using standard streams (stdin, stdout, stderr), but although only pipe can keep sudo privileges, why? Works: sudo echo "hello" ...
linuxer's user avatar
  • 25
0 votes
1 answer
31 views

Huge number of packages are about to be deleted after Debian upgrade, how to check list in text mode?

I am about to upgrade from Debian 11 to 12. I pressed Ctrl+Alt+F3 and entered text mode to ensure a smooth upgrade. Update & Upgrade system $ sudo apt update $ sudo apt upgrade Edit /etc/apt/...
asmd755's user avatar
0 votes
1 answer
48 views

How does vim catch mouse scroll events?

I am writing a text editor. With 1049 (alternate screen) mode + 1000 (mouse tracking) mode enabled, the terminal is able to catch both mouse scroll events and click events. I do not need the click ...
user129393192's user avatar
0 votes
5 answers
119 views

How to create a list of words from custom elements?

I want to make a list of words in a text file from custom elements: element1: word1 word2 word3 element2: word4 word5 element3: word6 word7 I want each to be made of a combination of the words in ...
thebunnyrules's user avatar
0 votes
1 answer
80 views

How to `import FreeCAD` in CLI (python)

How can I import FreeCAD from the python console? I'm trying to write a script that can manipulate a given FreeCAD file, but I can't even get FreeCAD imported into the python console on a system where ...
Michael Altfield's user avatar
0 votes
0 answers
60 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
4 votes
4 answers
263 views

Using the command line, multiply all entries within a column to a fixed number, but only if the line is not a comment

I am trying to: Always add 0 0 0 to the first row of the file. Multiply 2*pi or 6.2832 to the first column of a three-column file formatted similar below, but only if the line begins with a numeral. ...
Carla H.'s user avatar
  • 161
0 votes
0 answers
37 views

How to print multiple pdfs using pipe and stdin?

I am attempting to print multiple pdfs from the command line: locate FilesIwantToPrint | grep pdf | lp - This prints the list of pdfs on one page instead of printing the files themselves. Is it ...
Noga Ha's user avatar
0 votes
3 answers
84 views

Gain access to selective subdirectories inside main directory

I am looking for a way to gain access to only certain subdirectories inside the main directory in z/OS UNIX. Is there any way to accomplish this? Currently the main directory permissions are set to ...
Brindha Sharadha's user avatar
0 votes
0 answers
20 views

Automatically detecting whether a process is running normally by listening to stdout for continuous stream of messages

I have a chatty application that I'd like to automatically test post CI/CD build by leveraging the output stream as follows: If the application is running normally it will continuously dump a few ...
Olumide's user avatar
  • 167
1 vote
3 answers
76 views

How to config alias on RedHat server?

I'm using a server where I'm a common user (non-sudo). I access the server through ssh. Here's the output of some commands run on the server: [username@machinename: ~]$ ps -p $$ PID TTY ...
Tien PHAM's user avatar
0 votes
1 answer
28 views

Console output not aligned on 4k screen

After a fresh Ubuntu Server install, the console (no GUI) output is not aligned to the left side of my 4k screen. Instead, each line starts at a third of the screen width away from the right side, and ...
Ashkan Arabi's user avatar
0 votes
1 answer
104 views

Process CSV file through command line: Remove only middle rows between consecutive row entries if consecutive entries have the same 2nd column value

I have a CSV file with only 2 columns (but lots of rows) and the occasional irregular row which always starts with an asterisk (*) character and may span more than two columns. Using just the Linux ...
Carla H.'s user avatar
  • 161
2 votes
2 answers
154 views

How to watch video while still downloading including audio?

If I download a video using youtube-downloader I can watch the part file while downloading (in my case using mpv). Suppose I cannot or don't want to select a format containing both video and audio ...
student's user avatar
  • 17.9k
0 votes
0 answers
47 views

Binary hangs when writing to stdout but works when piping to cat?

I observed odd behaviour of a utility binary (it's actually the minio client mc in a recent-ish version) when running it from the command line. If I just run it like ./mc --version, the command hangs ...
Max's user avatar
  • 147
0 votes
1 answer
61 views

Bash script with command line options gets stuck and doesn't set default values for variables

I am pretty green when it comes to bash scripts and completely new to command line functionality in bash. I tried my hand at a script which is supposed to be useable both with command line arguments ...
J.Doe's user avatar
  • 103
0 votes
0 answers
30 views

Can't connect: No route to host -- l2ping Linux

I'm testing out l2ping via a Ubuntu VM on a MacOS machine, ran using UTM QEMU. The following command: sudo l2ping -s 5000 -f <my speaker's bluetooth MAC address> produces Can't connect: No ...
user129393192's user avatar
0 votes
0 answers
133 views

`chown` not working, even using sudo

I am getting this error from git: fatal: detected dubious ownership in repository at '/run/media/marcel/Хранилище/Dev/Desktop/SimpleAccent' To add an exception for this directory, call: git ...
MrArsikk's user avatar
0 votes
1 answer
37 views

Calling vim in subprocess after running cat

I am trying to create a bash function vim_run which operates as follows: user pipes command output into vim_run user can edit output user exits vim and the contents of that buffer are now executed ...
zbs's user avatar
  • 3
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
29 views

Open file from terminal in already running "pure data" instance

Whenever I xdg-open patch.pd it will open a new pure data instance, how can I make it open with existing instance?
Leo Zerino's user avatar
0 votes
2 answers
28 views

Is there option to convert outputs of row in to new column in linux and delete duplicate entry in row

I have a cli output as below, GROUP DEFINITIONS SERVICE DIMENSION RESULTSBYTIME False KEYS AWS CloudShell BLENDEDCOST 0.0000026589 USD KEYS AWS CloudTrail BLENDEDCOST 0.000001 USD KEYS ...
code userit's user avatar
-2 votes
1 answer
126 views

How to find one of multiple processes with the same name using pgrep (or another tool)? [closed]

I have several bash scripts running. The only thing that differs between them is the pid. I want to write a script like this that only monitors one specific bash process and exclude any daughter ...
d-b's user avatar
  • 1,713
0 votes
0 answers
22 views

PageUp/PageDown -- how to catch properly?

I am here on a tutorial to build a text editor. I'm finding that on my macOS (it works on a Linux VM), even with raw mode enabled, I'm unable to intercept Page Up and Page Down, which are sent via fn-&...
user129393192's user avatar
0 votes
1 answer
41 views

Auto-translation of newline characters in the terminal

I'm following along here. I notice (this is not complete, just for demonstration) that at this point: #include <termios.h> raw.c_iflag &= ~(ICRNL | IXON); raw.c_oflag &= ~(OPOST); ...
user129393192's user avatar
0 votes
0 answers
46 views

Zorin OS stuck on blank screen and blinking cursor on boot after changing the PATH variable

I've googled and tried out all the ways but in typical IT fashion, none of them worked T_T. I have Windows 11 and Zorin 16 dual boot on my Lenovo Legion 5, on separate disks (windows is 500GB, Zorin ...
Worker1432's user avatar
0 votes
1 answer
31 views

Atrun command in macos is not starting

I'm learning the 'at' command in macOS. However, my 'at' command jobs are getting scheduled but never executing. For example, when I run a simple command like echo "hello world" | at 9:30 AM,...
Mathew Nelson's user avatar
0 votes
1 answer
121 views

Depmod command not found but kmod is already installed

When I use depmod in the terminal, I got the message "depmod command not found". But kmod is already installed. And I can find a link to something called depmod in sbin. Do you know how to ...
Chènevis's user avatar
  • 101
1 vote
1 answer
49 views

Rename the sub-sub-directories of a directory named _QWE

I can run a command in all directories named _QWE using: find . -name '_QWE' -type d -execdir touch {}/1234.txt \; However, I need to run -execdir rename 's!^\./(\d+ -)\s(\d+\.)!$1!' {} \; in all the ...
Ahmad Ismail's user avatar
  • 2,500
0 votes
3 answers
71 views

Handling Space in Filename for sed command

I have 3 files: en.json, en 1.json and en 2.json. All of them have the below content { "ABC" : "/long_name", "DFG" : "/{long_name}" } I run ...
Aditya Naik's user avatar
1 vote
2 answers
79 views

Pinning a file to that it appears in the beginning in a folder

I am using Ubuntu (Linux mint). There is a mouse option, if I right-click on a file, I can then choose to pin a file (inside its folder), so that whatever file arranging method (alphabetical, by-date, ...
mahbubweb's user avatar
  • 141
2 votes
1 answer
43 views

How to edit and execute a couple of commands from shell history?

Every now and then I want to recycle a command sequence I recently used, after I adapted it. Let's imagine, yesterday I executed foo 42 bar with some strange arguments baz /my/most/beloved/folder Now ...
Philippos's user avatar
  • 13.3k

1
2 3 4 5
123