Unix & Linux Weekly Newsletter
Unix & Linux Weekly Newsletter

Top new questions this week:

Why is Firefox so slow over SSH?

I try to launch Firefox over SSH, using ssh -X user@hostname and then firefox -no-remote but it's very very slow. How can I fix this? Is it a connection problem?

/ ssh / firefox  
asked by Antonio Balduzzi 14 votes
answered by terdon 12 votes

Renaming the current directory from a shell - possible?

Is it possible to rename the current working directory from within a shell (Bash in my particular case)? If I attempt to do this the straightforward way, I end up with an error: ...

/ shell / rename  
asked by Nathan Osman 10 votes
answered by Gilles 14 votes

Is it possible to reverse a command in the bash shell?

I was wondering if there is a (simple) possibility to redo/reverse a command that was executed in the bash shell? (to make it undone) Is there something similar to the ctrl+z combination to redo any ...

/ command-line  
asked by Fraenzine 9 votes
answered by orion 18 votes

How do I replace the last occurrence of a character in a string using sed?

How do I replace only the last occurrence of "-" in a string with a space using sed? For example: echo $MASTER_DISK_RELEASE swp-RedHat-Linux-OS- but I want to get the following output ( ...

/ linux / sed  
asked by maihabunash 9 votes
answered by jimmij 16 votes

How to remove duplicate characters?

If I am having a line as: Thhiisss iisss mmyyy nameeee I want to print this as: This is my name What is the unix command for this?

/ command-line / text-processing  
asked by krishna 9 votes
answered by Ketan 14 votes

Spaces next to pipes

I've seen history | grep blah and history |grep blah; and history|grep blah also works, though no one ever seems to use it. Is there any significance in the spaces (e.g. piping to/from different ...

/ bash / shell / pipe  
asked by EmmaV 8 votes
answered by John1024 15 votes

Sed alternative for search and replace on very long lines

I have files that were generated by a program that did not put newlines at the end of records. I want to put newlines between the records, and I can do so with a simple sed script: sed -e ...

/ sed  
asked by Tom Panning 6 votes
answered by terdon 5 votes

Greatest hits from previous weeks:

How do I set my DNS on Ubuntu 14.04?

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make just get overridden. $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by ...

/ ubuntu / dns / dnsmasq  
asked by Seán Hayes 35 votes
answered by Seán Hayes 1 vote

How can I get my external IP address in bash?

I need to find my external IP address from a bash script. At the moment I use this function: myip () { lwp-request -o text checkip.dyndns.org | awk '{ print $NF }' } But it depends on ...

/ linux / bash / ip  
asked by eugene y 62 votes
answered by Krinkle 71 votes

Can you answer these?

Mint battery hogger

Here's my friend's laptop configuration: Linux Mint & Windows 8.1 Intel Core i7-3537U NVIDIA Kepler GeForce GT 740M & Intel HD 4000 4Go RAM All the drivers are up to date Here's the ...

/ linux-mint / battery  
asked by Thomas 2 votes

Apache modssl returning random unwanted 200's rather than 404's

I have a fairly simple apache 2.4.7 config on CentOS 6.5 Linux and an active web server. No PHP or CGI, just some static pages and a proxypass to a different server tier. I'm doing some security ...

/ apache / ssl / apache-httpd / http-proxy / https  
asked by Cosmo F 2 votes

How can I print from vim using the native KDE print dialogue?

I'm using vim from a terminal emulator, and I'd like to be able to print using KDE's native print dialogue. This would let me select options such as printer, collating, number of copies and pages per ...

/ vim / kde / printing  
asked by Sparhawk 2 votes
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