Unix & Linux Stack Exchange Community Digest

Top new questions this week:

Print out specific field using regular expression in Linux

I'm trying to print lines that have a 4th field value of 1001 or 1003 from a file called mypasswd.  I can only use grep or egrep with regular expressions.  Here is the file: daemon:x:2:2:Daemon ...

text-processing grep regular-expression  
asked by Jake M 7 votes
answered by Jeff Schaller 13 votes

How to remove empty lines from begin and end of file?

I would like to remove empty lines from begin and the end of file, but not remove empty lines between lines. I think sed or awk would be the solution. Source: 1: 2: 3:line1 4: 5:line2 6: 7: 8: ...

awk sed cut delete line  
asked by Feriman 7 votes
answered by Stack EG 4 votes

Passing a block device to Qemu

Passing a block device to Qemu 3.0.1 like this works but yields a deprecation warning: -blockdev file,node-name=f1,filename=/dev/loop0 \ -blockdev raw,node-name=q1,file=f1 \ -device ...

qemu block-device  
asked by maxschlepzig 7 votes
answered by Stephen Kitt 9 votes

What does bash do in the background once it runs a program?

Does the terminal have its input routed through the bash process into the program currently being run, or is the terminal "disconnected" from the bash process and connected to the new program, ...

bash terminal tty  
asked by Idunnoanymore 6 votes
answered by Philip Couling 1 vote

grep extract number range

I am grepping date 2019-09-XX and 2019-10-XX but somehow my grep not helping out, i am sure i am missing something here Last Password Change: 2019-10-30 Last Password Change: 2017-02-07 Last ...

linux grep regular-expression  
asked by Satish 5 votes
answered by Jeff Schaller 6 votes

Delete files and folders recursively in subdirectories

There is a folder, "transfer". In that transfer folder there are user folders "user1", "user2", etc. I want to (periodically) delete the content (i.e. all files and folders in the user folders) but I ...

shell delete shared-folders  
asked by Silicomancer 5 votes
answered by mrc02_kr 17 votes

How can I insert a period on a line by itself while using Ed's "insert" command?

Normally, a period on a line by itself ends the insertion; how can it be escaped?

ed  
asked by Brennan Vincent 5 votes
answered by Jeff Schaller 6 votes

Greatest hits from previous weeks:

How to install a deb file, by dpkg -i or by apt?

I have a deb package for installation. Shall I install by dpkg -i my.deb, or by apt? Will both handle the software dependency problem well? If by apt, how can I install from the deb by apt?

software-installation apt dpkg deb  
asked by Tim 617 votes
answered by g_p 796 votes

Change the Python3 default version in Ubuntu

I am using Ubuntu 16.04 LTS . I have python3 installed. There are two versions installed, python 3.4.3 and python 3.6 . Whenever I use python3 command, it takes python 3.4.3 by default. I want to use ...

ubuntu python python3  
asked by codeclue 76 votes
answered by GAD3R 103 votes

How do I use pushd and popd commands?

What are the practical uses of both pushd and popd when there is an advantage of using these two commands over cd and cd -? EDIT: I'm looking for some practical examples of uses for both of these ...

shell cd-command pushd  
asked by syntagma 339 votes
answered by slm 313 votes

How can I monitor disk io?

I'd like to do some general disk io monitoring on a debian linux server. What are the tools I should know about that monitor disk io so I can see if a disk's performance is maxed out or spikes at ...

linux disk  
asked by camomileCase 270 votes
answered by jordanm 230 votes

How to install Desktop Environments on CentOS 7?

I have recently installed CentOS 7 (Minimal Install without GUI) and now I want to install a GUI environment in it. How can I install Desktop Environments on previously installed CentOS7 without ...

centos gui desktop-environment  
asked by αғsнιη 193 votes
answered by αғsнιη 319 votes

How do I change the extension of multiple files?

I would like to change a file extension from *.txt to *.text. I tried using the basename command, but I'm having trouble on changing more than one file. Here's my code: files=`ls -1 *.txt` for x in ...

bash shell-script rename  
asked by afbr1201 171 votes

How to mount a device in Linux?

I read some resources about the mount command for mounting devices on Linux, but none of them is clear enough (at least for me). On the whole this what most guides state: $ mount (lists all ...

linux mount  
asked by its_me 76 votes
answered by ghm1014 82 votes

Can you answer these questions?

Two X servers are running

I am running to a weird issue. After installation of Suse Enterprise Linux Desktop (this is a custom installation using script), I found that we are running to X servers one on tty7 (default) and one ...

linux x11 gnome  
asked by SKN 1 vote

HyperX microphone doesn't work (the sound works fine) on Pop OS

So i'm on Pop!_OS 19.10 (it works the same way as Ubuntu for the sound) I have a hyperX Headphone with a microphone, the sound works without any problem but my microphone don't (the microphone from ...

audio microphone  
asked by uiytt 1 vote

USB keyboard and mouse mouse control end after login

Ubuntu 18.04: When the login screen appears the USB keyboard and mouse work fine. I select an account and enter its password. As soon as the desktop for the given account appears, the mouse and ...

ubuntu usb keyboard mouse  
asked by Brook Wilson 1 vote
You're receiving this message because you subscribed to the Unix & Linux community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3