Questions tagged [command-line]

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

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

How to add shortcut for `open in terminal` option in fedora?

Isn't there any shortcut for open in terminal option. Inside folder you should right click and then choose open in terminal. Is it possible to make it easier and add shortcut for this?
0
votes
0answers
20 views

How to grep on a ncurses display (refreshed every second)?

When running the useful tool tcptrack in the terminal (over SSH), it displays this: Client Server State Idle A Speed 1.2.3.4:44054 5.5.5.5:443 ...
0
votes
2answers
21 views

How can I identify file names and directories from logs of Unix commands?

I have a data-set of Unix commands as input into terminal and I want to use them to compare user behaviours. Different users interact with different directories and files (they are all on separate ...
0
votes
1answer
9 views

How to write notifications to a file?

I've been trying to automate git pulls with a Bash script. To make sure I don't miss the execution results of the script, and yo log these results somewhere for possible reviews if things go wrong, I'...
0
votes
4answers
55 views

What is the best way to handle folders with millions of files in RHEL-7?

I am at an awkward situation. I am using the RHEL-7 machine having 62 GB RAM. In this machine, I have couple of folders where I have aound 8 million files. Unfortunately, I am finding it hard to deal ...
0
votes
1answer
40 views

Count number of words that end with specific letter

I have a list of books inside a directory which I'm reading from and I want to list all words from the books that end with the lower and uppercase of a specific letter. There's probably a way of doing ...
0
votes
2answers
41 views

partial match string in /bin/sh

Can someone explain to me why this doesn't partial match macaddress $mac? #!/bin/sh mac="f0:79:60:0f:d3:0e" if [[ "$($mac)" = 'f0:79:60*' ]] then echo "true" else ...
0
votes
0answers
15 views

“top” “ps aux” “dmesg” “ls -la” and other command do not run, freeze console, server is running properly otherwise

Never seen an issue like this. I have 2 webservers that do not allow me to run ls -la on them, but they do run ls properly. I can't run top, ps aux, dmesg commands either. I can run ps but if I add ...
3
votes
2answers
41 views

Append all files in a directory as cli arguments

I need to run a command that looks like this mycli --file test.zip --file another_test.zip How could I run that dynamically with all zip files in a directory? I'm sure I could pipe the files from a ...
0
votes
1answer
18 views

How to remove up arrow to search the history?

I am not really good with Linux but I got one premade server which has Linux on it to supervise. The OS is CentOS 7. I noticed that the up arrow allows the search of past commands (not only for the ...
0
votes
0answers
13 views

Pathing issue with Zshell , no commands working at all

Hi guys having issues with zshell, always getting command not found though nodes are installed globally and showing in package.json, I believe it an issue with my path. I've definitely got node ...
0
votes
1answer
8 views

How to access the setup tool in chocolate-doom?

The documentation mentions no command-line arguments for launching the setup program. The Windows version appears to have a dedicated executable.
1
vote
0answers
24 views

Find directories that don't have a file with specified name [duplicate]

I've done a good amount of research on this and put together this command, but it appears to be finding the directories that HAVE scanned.txt not the directories that don't have scanned.txt. How can I ...
1
vote
1answer
23 views

Is there any way to install a transient package?

Using a live linux distribution we can install some package , it is not a persistent install, the package will be removed next boot. On a fully installed system, is there any command line tool or an ...
1
vote
2answers
26 views

Copy a file's line and place in command line

I'm interested to know if there is any way to copy a line from a file and place it in the next terminal's command line. This line would be the next command or a fraction of it, being possible to still ...
0
votes
0answers
33 views

Why Does `Break` Finish the Rest of the While Loop? [closed]

***Edit: I completely messed up my thinking, but it's working as it should. Sorry for any confusion In my sample script below, I have a while loop that iterates over a and I would like the script to ...
0
votes
0answers
8 views

Cache website using mod_pagespeed from command line

I have a number of sites (1000+) on a web server running Apache / mod_pagespeed. I am super happy with the performance that I am getting after all the tweaking was done, but now I am trying to run ...
0
votes
0answers
16 views

/usr/bin/su question regarding setuid [duplicate]

By default, /usr/bin/su has -rwsr-xr-x privilege. When I revoke the setuid from su file, non-root users are not able to execute su command to login as a different user. Why is this? Shouldn't it work ...
3
votes
2answers
79 views

Bash: How can I check if a website has finished loading?

Problem I am trying to automate a task in my Firefox browser with xdotool. First, I open a new tab in my browser with: firefox -new-tab "www.domain.tld" Then (after the page www.domain.tld ...
1
vote
1answer
38 views

how to rename a file like a weblink (http://…)

I need to rename a file like a link, but if I try to rename it with mv file.gif http://link/123/file.gif it won't work. I've tried to escape the Slash / with a Backslash \ , but with no success. The ...
1
vote
1answer
28 views

zsh: extract command line arguments into two strings

My script takes arbitrary number of arguments and also few options: I need to extract any options plus the first argument into one string, and any remaining arguments into a second string. ie: ./...
2
votes
2answers
36 views

How to choose an appropriate error prefix? [closed]

How can I figure out appropriate error prefixes to use when reporting various kinds of errors? Is there are guideline or overview of how these should be? I see patterns in many commands, but find it ...
0
votes
0answers
38 views

how to command2 command1 in one-line

I'd like to have a one-liner at hand but it requires specifying a variable. In order to not go back to the beginning of the command line each time to modify the variable, I'd like to have it at the ...
0
votes
4answers
40 views

Remove certain character within a pattern of text

I have a folder with markdown files containing text with citekeys in the Pandoc format [@Name:2021]. I decided to remove the colons from my citekeys and would like to automatically delete them in my ...
0
votes
1answer
30 views

Is it possible to control gui tools that do not have cli support with cli? [closed]

How can we manage a program that can only be used from a graphical interface through the bash shell. I'm not just saying to running the program. I mean being able to use the functions of the program ...
2
votes
1answer
41 views

Get the command line for the process that owns a window [closed]

How can I detect in Lubuntu the command line invocation of a process from one of its windows, so that I can run it later from the command line?
0
votes
0answers
11 views

Joining multiple of ppts power point presentations

Do you know about any terminal command or any program that can join around 30 -35 ppts.
2
votes
1answer
68 views

bash: /bin/sed: Argument list too long

I have two files.  The first (emails) should be cleaned according to the second (domains). First is 15 GB, second is 160 MB. dom=`cat file2.txt | xargs | sed -e "s/ /|/g"` ; sed -r "/$...
0
votes
1answer
32 views

Optimal command-line search inside a sorted text file

Let's say I have a text file with billions of text lines sorted alphabetically, like Bar=10 Foo=6 Naz=42 How can I search for the line starting with Foo in the most optimal way (the file contains ...
1
vote
1answer
18 views

Command-line variable assignment and command execution

While researching more in-depth information about Bash subshells, I ran into an interesting execution that I would like to understand why it works. The execution involves assigning a string to a ...
0
votes
1answer
70 views

How to run AppImage on the command line

I'm sometimes working on the command line (or in the Ranger file manager), and it's annoying to have to move to a graphical interface to double-click on a AppImage. It looks like Ranger tries xdg-open;...
0
votes
1answer
29 views

Rsync problem copying folder to server (missing public-key)?

I am a not very experienced with syncing or SSH.. but I am trying to sync a folder on my local linux machine to a remote webserver (local and remote running ubuntu). When I try this on my local ...
0
votes
1answer
26 views

Separate high-resolution single-page PDF into multiple pages

How can I separate the following high-resolution single-page PDF into multiple pages (page count is unimportant), so that each page is the size of standard printer paper (8.5"x11"). The map ...
1
vote
0answers
52 views

Simple AND secure command line HTTP server [migrated]

A follow-up question to this one from 2012: Simple command line HTTP server Does anyone know a simple file webserver that is also secure? Many propose using http.server from Python, but docs ...
1
vote
1answer
42 views

accessing git-annex special remote from new repository

I'm using git-annex in version 7.20190129 as it is provided on my Debian Stable (Buster) machine to keep big files under version control and have them distributed over multiple machines and drives. ...
0
votes
0answers
35 views

Display notification multple times using calcurse

On my Debian Stable (Buster) system I'm using calcurse in the included version 4.3.0. Just recently I realized that I'm able to use the option notification.command=SOMECOMMAND in the ~/.calcurse/conf-...
0
votes
4answers
62 views

How to check duplicate commands in $PATH?

For example, youtube-dl has different ways to install it onto machine. I downloaded/installed it multiple times in not-same ways inadvertently, so that resulted that I have several youtube-dl ...
1
vote
2answers
78 views

what is the csh equivalent of set -xv?

I have a rather long csh script that doesnt work, or doesnt work properly. in bash I would do set -xv to get verbose logging. what can I do in cshell? I tried adding set -xv it complained that - isnt ...
3
votes
1answer
83 views

Unlock ssh key on login

When in the graphical environment, seahorse unlocks my ssh key (locked with a passphrase) so I can ssh to another host without entering a passphrase. But when on the command line, I am still asked for ...
1
vote
2answers
43 views

How to handle with command to execute only it's subdirectory? [duplicate]

I'm looking for a way of execute command which I can execute some command only under sub directory not command affect to current directory. find -name ":RUN" -exec rm -rf {} \; If I got a ...
0
votes
1answer
11 views

How to specify boolean value in argument to external command?

The man page for txt2html says: --make_links Should we try to build links? If this is false, then the links dictionaries are not consulted and only structural text-to-HTML ...
1
vote
0answers
15 views

What is the Mac OS X equivalent of extracting the device file for the recently plugged in USB memory stick from dmesg in Linux?

For more context: I have this command to put in a document showing how to write an ISO directly into the most recently plugged in USB memory stick in Linux: dd if=image.iso of=$(echo /dev/$(dmesg | ...
0
votes
1answer
16 views

password protected .zip extracts to empty folder (without prompting for password)

I've create a zip archive using the following command: zip -e myfolder.zip myfolder/ Which prompts for a password and compresses the folder without errors. Now I'm trying to unzip the archive using ...
1
vote
1answer
26 views

Display name and/or path of currently viewed email in mutt/neomutt

I'm using neomutt (an updated fork of mutt) as my CLI MUA (read: mail reading software in the terminal) and have all my messages synced offline using isync/mbsync and stored in the maildir-format on ...
0
votes
1answer
7 views

dotnet run --ulrs on a systemctl service

I need to run dotnet run --urls https://0.0.0.0:443 to run a dotnet core API, but I want to turn that into a service, right now I have this: sudo nano /etc/systemd/system/mdvAPI.service [Unit] ...
1
vote
1answer
42 views

Pipe output to command line editor for next command

I have been using sudo find / -iname '*foo*' 2>/dev/null | vim to get a list of directories/files containing foo, and then I inspect this list, edit it, and write a bunch of new commands inside of ...
3
votes
1answer
67 views

zsh completion for custom script

I have zsh completion for my custom script. It takes 3 optional arguments --insert, --edit, --rm and it completes files from given path: #compdef pass _pass() { local -a args args+=( '--...
3
votes
1answer
91 views

Return control after command ends in Ubuntu

Apologies for this newbie question but I can't find the answer anywhere. If I run the command systemctl in a SSH terminal accessing an Ubuntu VM in Azure, then it ends with lines 159-187/187 (END), it ...
0
votes
0answers
26 views

What do the different colors in ls output mean? [duplicate]

What do the different colors in the Linux ls command mean?
0
votes
1answer
15 views

how do you automatically enable network interface at system startup?

I have a network interface that is configured for static ip address. When I reboot I have to always open the NetworkManager GUI and click "connect" button. How do you automatically enable ...

1
2 3 4 5
108