Unix & Linux Weekly Newsletter
Unix & Linux Weekly Newsletter

Top new questions this week:

How can I kill a process and be sure the PID hasn't been reused

Suppose, for example, you have a shell script similar to: longrunningthing & p=$! echo Killing longrunningthing on PID $p in 24 hours sleep 86400 echo Time up! kill $p Should do the trick, ...

/ process / kill  
asked by FJL 21 votes
answered by Stéphane Chazelas 19 votes

Why is it risky to give sudo vim access to ordinary users?

I'd like to create a new user and give him sudo access. To be specific, I want him to use sudo vim and edit httpd.conf. I wrote this in sudoers: user ALL=(ALL) /usr/bin/vim ...

/ ubuntu / vim / sudo / configure / httpd  
asked by mi0pu 20 votes
answered by HBruijn 41 votes

Why does running `killall init` as user log me out?

On multiple computers running Ubuntu 14.XX, I ran the command "killall init" as user, and was immediately logged out. I could log back in again without a problem. Why is this? What's going on behind ...

/ kill / init / logout  
asked by EMBLEM 11 votes
answered by muru 18 votes

What are benefits and downsides of unprivileged containers?

The technical explanation of what is unprivileged container is quite good. However, it is not for ordinary PC user. Is there a simple answer when and why people should use unpriviliged containers, and ...

/ security / virtualization / lxc / privileges  
asked by techtonik 9 votes
answered by geekbass 7 votes

How to get the last N files in a directory?

I have many files that are ordered by file name in a directory. I wish to copy the final N (say, N=4) files to my home directory. How should I do it? cp ./<the final 4 files> ~/

/ shell / files / filenames / wildcards  
asked by Sibbs Gambling 9 votes
answered by John1024 19 votes

Pipes, how do data flow in a pipeline?

I don't understand how the data flows in the pipeline and hope someone could clarify what is going on there. I thought a pipeline of commands processes files (text, arrays of strings) in line by line ...

/ shell / text-processing / pipe / stdout / buffer  
asked by xealits 8 votes
answered by Wumpus Q. Wumbley 13 votes

tar to pipe but keep -v verbose output separate from STDERR

A normal tar command tar cvf foo.tar ./foo >foo.out 2>foo.err has three output IO streams archive data to foo.tar list of filenames to STDOUT (redirected into foo.out) error messages to ...

/ tar / ksh / io  
asked by RedGrittyBrick 8 votes
answered by Stéphane Chazelas 5 votes

Greatest hits from previous weeks:

How to set default file permissions for all folders/files in a directory?

I want to set a folder such that anything created within it (directories, files) inherit default permissions and group. Lets call the group "media". And also, the folders/files created within the ...

/ permissions / directory  
asked by Chris 81 votes
answered by Chris 58 votes

ssh-add complains: Could not open a connection to your authentication agent

I've been trying to get ssh-add working on a RaspberryPi running Raspbian. I can start ssh-agent, when I do it gives the following output into the terminal: ...

/ command-line / ssh / ssh-agent  
asked by Daniel Groves 40 votes
answered by Stéphane Chazelas 53 votes

Can you answer these?

FreeBSD: Restart one service each time another restarts

On FreeBSD, what is the correct/canonical way of specifying that one rc script is reliant on another, such that each time the service it depends on is restarted, the dependent service is then ...

/ freebsd / services  
asked by Mahmoud Al-Qudsi 2 votes

Lost Win7 boot after installing UBUNTU Vivid

I have a dual boot system (Win7 for my company) and (UBUNTU 14.10) .. My company is using Encryption for the image of Win7. After Win7 installation i installed UBUNTU 14.10 and i was able to boot ...

/ ubuntu / mount / windows / dual-boot / ntfs  
asked by Akkosh 1 vote

Mapping mouse buttons with udev hwdb

Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/ I've set up a config file: $ lsusb | grep G500 Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 ...

/ udev  
asked by J V 1 vote
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3