Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
24 views

How to get the different with the previous output by grep?

I use grep to get the output of mysqladmin as sudo mysqladmin ext -i10 | grep 'buffer_pool_pages_flushed' and the output is continuous (every 10 seconds) as | Innodb_buffer_pool_pages_flushed ...
0
votes
0answers
3 views

“ps -fC tmux” command does not show tmux process

I am running a tmux server. When I checked the process, I can see the tmux process: # ps -ef | grep tmux | grep -v grep root 4129 1424 0 17:47 pts/0 00:00:00 tmux root 4131 ...
0
votes
0answers
19 views

Unexpected output between two background processes

When two commands are put in the background and killed one after the other, such as in this code #!/usr/bin/env sh while true do sleep 1 printf "." done & sleep 3 kill $! while true do ...
1
vote
1answer
11 views

How can I edit columns of numbers in vim using conditionals?

If I have, for example, a column of numbers: 4 6 8 10 12 Is there a way in Vim that I could find all numbers higher than 8, than do math only with these numbers? Obtaining a new column as a result: ...
2
votes
1answer
60 views

How to cat a specific tone to /dev/audio?

cat /dev/urandom generates a random sequence of all possibles "values". cat /dev/urandom | padsp tee /dev/audio > /dev/null directs these "values" to your audio device, turning them into "random ...
1
vote
0answers
43 views

Can GNU Parallel execute a bash script 25000 times per seconds and parallel processes?

I am testing my web server response. Well I have a computer with 15 CPUs and 30 GB memory. How can I execute the following bash command on this computer 25000 times per second? curl -Z url="...
0
votes
0answers
13 views

How to delete all the files except a few list of files elegantly?

I am trying to delete a list of files except a few of the files in the yocto script. What is the best way to do so. Here is my recipe. # Encodings that we need REQUIRED_ENCODINGS = "\(-name ascii.py -...
-1
votes
0answers
33 views

Difference between $1 > wc -l and wc -l < $1 [duplicate]

Why doesn't echo $($1 > wc -l) work but echo $(wc -l < $1) works? For printing the number of lines of a file given as command line argument. Shouldn't they be the same thing?
0
votes
0answers
11 views

Retrieve mails and process each attachment individually

I want to retrieve new mails using a shell script and if the mail I just retrieved has attachments, these attachments should be saved to a folder. Before the next mail is retrieved, the attachments ...
0
votes
0answers
16 views

Save Content of GUI

This question may seem vague. I am executing a binary, which greets me with a GUI, giving an option to choose from given choice. I have to select one of them. Now I want a way to enlist those choices ...
0
votes
4answers
42 views

Question about Gnu/Linux command line interface, with grep, ls, and cat

Greetings Stack Exchange, My Goal:Execute ls to search the entire directory structure and grep to search for cats.py. Use cat to read the file cats.py. I know that sounds like Gnu/Linux inception. ...
-1
votes
0answers
19 views

shuffle strings

I have a list of names such as Tony, Rob, Mike etc. and I want to shuffle the names randomly by only Unix command lines. Then mail the names to an email. How can I do it? Just to add that I am not ...
0
votes
3answers
47 views

awk and egrep for regular expression

I am very new to unix! trying to figure out, from a fastq file how many reads have 3 or MORE As in a row? I used egrep 'A{3}' to tell me how many AAA I have. But now I want to know >= 3 AAA in a ...
0
votes
1answer
64 views

Gnu/Linux command to list all users who has access to one folder

I was trying to find all the users in my Gnu/Linux system that have access to one particular folder. I tried $ ls -ld */ dr-xr-xr-x. 2 root root 28672 Mar 20 21:33 bin/ dr-xr-xr-x. 4 root ...
0
votes
0answers
11 views

How to download all linked files on another domain

I'm updating my list of ISOs and want to download all the torrent files over at NetBSD. However, these are on another domain, so the default wget command of wget -nd -r -P . -A torrent https://www....
0
votes
3answers
40 views

Removing text after a delimiter up to a certain point in Bash/Linux

target_id tpm tpm tpm tpm tpm tpm tpm tpm tpm tpm tpm PB.1.1|1:6643-11779(-)|transcript/55100 9207.33 13266.4 15244.3 2844.27 2708.52 2731.91 3193.83 2675....
0
votes
1answer
10 views

XenServer 6.5 Trying to launch VMs from Local SR

Let me being by saying I am new to Xen Server, I’m come for the telecom/networking world, but now I find myself managing servers. With that being said I am looking for assistance with setting up a ...
0
votes
0answers
20 views

Failed to show the preferences dialog GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown

I am facing issue in USB Live persistence Kali linux . I have installed it correctly and everything is going on nicely but after running it sometime i saw that the upper panel is not there it was gone ...
-2
votes
0answers
34 views

How can I like or dislike YouTube videos using the command line?

Is it possible to like or dislike a youtube video using linux terminal or any programming language (c, python, etc) ? Edit: I mean doing this in the background not by opening the browser and using ...
0
votes
2answers
35 views

Is it possible to merge rows based on the composite unique values of two columns

Sorry I am very new to Linux and I am uncertain the capability of bash for what I want to achieve. I want to merge column-2 values if column-1 and column-3 values are identical. In this case, if ...
0
votes
0answers
15 views

Inspect/browse gzipped dd disk image from command line without decompressing and mounting?

I did a disk image, as per How to dd a remote disk using SSH on local machine and save to a local disk : ssh user@remote "dd if=/dev/sda | gzip -1 -" | dd of=image.gz` Now, I would just like to ...
0
votes
2answers
35 views

How do I find all sqlite databases inside a bunch of files without file endings?

I have a bunch of files that have just hashes as names and no file endings. (It's an iPhone backup to be precise.) I know there are SQLite databases amongst these files. How do I find them?
0
votes
1answer
61 views

!! bash command

When we run !! in a shell session, it prints and run last executed command I was wonder if it is an alias for another long-written bash built-in command and would like to know where it is defined I ...
0
votes
0answers
24 views

Find/check disk usage/utilization for entire hard drive (all of its partitions) from command line

I have been looking for a command that would give me available space, used space, and percent of space utilization for an entire hard disk (drive). Unfortunately most of the answers I can find online ...
0
votes
0answers
24 views

How can i write a program in python to switch to root user from normal user in linux and again back to normal user?

I am scripting in python and till now I have been accessing the commands from normal user. Now I have to delete a file from var/tmp folder which can be done after being a root user. So how can I write ...
0
votes
1answer
21 views

Copy Files from one directory to another while creating a new folder for each file, named after the file

This is my first time asking a question. I am newly trying to use command line more and more but this problem is beyond my skill. I want to do a multi part file transfer. 1) I want to take multiple ...
3
votes
1answer
24 views

Is there a linux local tool to view, search, add contacts to/from a .vcf file?

I've downloaded my contact list in a .vcf format to my linux machine. I would like to be able to consult it without having to connect to the internet. The search feature is most important. I've got a ...
1
vote
1answer
27 views

Trouble trying to set no password for certain cli commands in linux

Computer Environment OS: Arch linux - Manjaro Shell: zsh AIM I'm trying to enable the following commands to not require a password input for my main user account: ab sudo systemctl stop ...
0
votes
3answers
35 views

How can I display the first n different lines in two files from a shell?

How can I display the first n different lines in two files from a shell ? I've tried with grep -vf but it does not really work. Suppose n = 5 This input: file1 a b c d e f g h i j k l m n o file2 ...
0
votes
0answers
22 views

nmcli doesn't allow vpn.data property with list of options

I'm trying to create a VPN connection using nmcli, but it won't allow me to set the ipsec-ike property to a list of algorithms. Example: nmcli connection add \ connection.id my_vpn \ con-name my_vpn \...
0
votes
0answers
13 views

Alpine 2.2 [Mail not sent: Sender address rejected: not owned by user]

I'been trying to configure the command line mail client Alpine to work with an autistici.org mail account. I can access to my inbox and read incoming mail without an issue, the problem is I can't send ...
0
votes
4answers
88 views

Effective ACL permissions changing permissions

From a bash shell script, I am creating a folder and storing the mysqldump there. I am sure that there is no command related to permissions in my script. To allow an other user to access these files, ...
0
votes
7answers
79 views

Struggling with GREP commands, removing decimal point correctly

I've written the shell command below to output the CPU's clock speed as an integer: grep -m 1 'cpu MHz' /proc/cpuinfo | grep -o -E '[0-9]+' OUTPUT: 900 063 This is because the exact clock speed is ...
-1
votes
1answer
48 views

Unix echo command with -e option

I was reading about the echo command in UNIX and i found the -e option which is used to enable the interpretation of backslash escapes, the thing is one of these backslash escape sequences was the \ ...
0
votes
0answers
8 views

synchonizing mp3 playback in cli-based presentation (using asciinema or other presentation software)

My goal is to have terminal-based presentations about coding. I want to use a tool like asciinema (which can playback the recordings in the terminal) to present code, run commands, and display ...
0
votes
2answers
59 views

send linux console through serial

What I want to do is connect my PC to my terminal a DEC vt320 and be able to output the Linux console to it and for me to be able to type commands into the terminal and for it to send a reply on the ...
0
votes
1answer
20 views

How to tail on demand based on a search and colorized the result

Hi I have a log file that has a lot of information and it is pretty difficult to spot what I am looking for, so I came to this command that show me only what I want to see in the log, it will act as a ...
-2
votes
2answers
51 views

How to replace space by __

I have a file containing space for example like this: ACTTTTTTTTGSGSGSGSG TTT RTATATTATRSSTSTSTST HHH I want to eliminate the space and get the result: ACTTTTTTTTGSGSGSGSG__TTT ...
2
votes
0answers
35 views

Burning large files on BD. Capacity confusion

I have a couple of large files I want to burn to an M-Disc 50G BD-R DL. Files are larger than 4G so I have to use UDFv3, if I am not mistaken. (Or split, which I am not especially keen on doing.) A ...
1
vote
1answer
18 views

Using autojump / z in combination with pushd popd

Autojump or z let you move around in your filesystem by entering only a part of the entire path (e.g. z foo takes me to /long/long/path/to/foo). I often want to jump to a path, do something, and get ...
0
votes
2answers
19 views

Changing wallpaper with terminal command on macOS

It's possible to change the wallpaper through the command line with the command osascript -e 'tell application "Finder" to set desktop picture to POSIX file "<absolute_path_to_file>"' where of ...
0
votes
0answers
8 views

Which setting for chroot/container name in command prompt in Fedora (like debian_chroot)?

Debian/Ubuntu has a debian_chroot setting, either environment variable or file in /etc, that will cause the contents to show up in the command line prompt. Is there a command line prompt script and ...
1
vote
5answers
81 views

How to select unique entries from multiple text files and print in output file?

I have 3 files with similar data. I want a bash script which can read the 3 files and output the unique entries with their values. Example: 1.txt aceE 14 aceF 8 adhE 20 asnS 2 carB 2 ...
1
vote
0answers
75 views

Debian10: No such file or directory: /dev/dri/card0

I'm installing Debian 10 but I cannot startx nor have a GUI. I think the problem is about some driver. Here are the errors I've got in /var/log/Xorg.0.log : [drm] Failed to open DRM device for pci:...
1
vote
2answers
172 views

How to pass a passphrase to ssh-add without triggering a prompt?

I read man ssh-add and I don't see a flag for passing a passphrase like we have in ssh which is -p. I tried # the -K is for macOS's ssh-add but it's not relevant ssh-add -q -K ~/.ssh/id_rsa <<&...
1
vote
0answers
18 views

lslogins Frozen and not Responding

I have two RHEL 7 systems and one is able to run lslogins, but the other one will run it, but freezes and doesn't finish. The $PATH variable has the required variables and matches the other system. ...
0
votes
1answer
18 views

sort with keeping the color coded result from pdftotext find

I have a find command that works perfectly except that it doesn't sort the results. path = path to the folder where you want to search foo = search term find /path/ -name '*.pdf' -exec sh -c '...
0
votes
0answers
10 views

How do I interpret `flatpak install` output?

I'm simply trying to install Spotify with flatpak install spotify. Here's the output: Looking for matches… Found similar ref(s) for ‘spotify’ in remote ‘flathub’ (system). Use this remote? [Y/n]: y ...
0
votes
2answers
51 views

test: too many arguments returns

I saw other posts the same problem, but I can't figure out since everyone does different things. I'm new to shell script as well, so my limited knowledge is getting more confused when I read those ...
0
votes
0answers
34 views

Extract audio from mp4 video using command line

Is there any command to extract audio from mp4 video?

1
2 3 4 5
100