Unix & Linux Weekly Newsletter
Unix & Linux Weekly Newsletter

Top new questions this week:

Unix command to check if any two lines in a file are same?

Is there a unix command that can check if any two lines in a file are the same? For e.g. Consider a file sentences.txt This is sentence X This is sentence Y This is sentence Z This is sentence X …

/ text-processing / search  
asked by CodeBlue 14 votes
answered by grebneke 30 votes

Vim - map last shell command to the key

Is there any way to map leader-r to repeat last command sent to bash? For example, when working with C files I would like to compile and run program from vim without typing :!make or gcc. I know I …

/ vim / key-mapping  
asked by camabeh 8 votes
answered by Carpetsmoker 0 votes

how to find out namespace of a particular process?

I already asked a question about how to list all namespaces in Linux, but there wasn't any correct and exact answers, so I want to find out a method which can help me to find out the namespace of PID …

/ linux / process / namespace  
asked by zerospiel 8 votes
answered by Stephane Chazelas 7 votes

Can I truncate long file names in ls listing

I have a number of files with very long names. Please, is there a way to use ls -C and truncate the file names to get more columns for an overall view? Or is there a better way to get a compact …

/ filenames / display-settings  
asked by Harry Weston 8 votes
answered by Stephane Chazelas 8 votes

Why 'echo $0' gives different result for two different terminals?

I opened a terminal on Ubuntu using Ctrl+Alt+T and a different terminal by going to a directory and then right clicking and choosing "Open in Terminal". I did an echo $0 in both cases. In the …

/ bash / ubuntu / terminal / gnome-terminal  
asked by CodeBlue 7 votes
answered by X Tian 12 votes

Using empty line as context "group-separator" for grep

I need grep output with context, in color, and blank lines as group separator. In this question, I learned how to define custom group-separator, and I have constructed my grep command like this: grep …

/ grep / perl / colors  
asked by Martin Vegter 7 votes
answered by bdowning 5 votes

What sets systemd apart from other init systems?

It is not quite official but it looks like systemd is coming to Debian and after reading some of the heated mailing list discussion on that decision, I am curious about the polarizing nature of …

/ systemd / init-script  
asked by casey 6 votes
answered by slm 5 votes

Greatest hits from previous weeks:

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 35 votes
answered by joschi 23 votes

Tell fs to free space from deleted files NOW

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After …

/ disk-usage / ext4 / ext3 / proc / df  
asked by Marcos 10 votes
answered by Aleksandar Ivanisevic 14 votes

Can you answer these?

AltGr key released when rappidlby pressing other keys

I have a Norwegian Lenovo USB keyboard. When I hold AltGr and press v and b rapidly, it produces “bvbv instead of “”“”“”. I get the latter, expected, result when pressing v and b slowly. Never …

/ keyboard / compose-key / lenovo  
asked by Aeyoun 1 vote

How do I stop charging the battery way prior to 100% in OpenBSD?

I'm thinking about using a netbook as an OpenBSD server. I'd like it to have UPS -- so the integrated battery is quite useful. However, I'm very familiar with the batteries going dead very quickly …

/ openbsd / power-management / battery / netbook / acer  
asked by cnst 1 vote

Is there an equivalent of addr2line on AIX system?

I'd like to debug proftpd on AIX and according to the documentation, addr2line is a usefull binary to identify what is not working. Extract of proftpd debugging documentation: The key here for …

/ compiling / aix / debugging / xlc  
asked by Kiwy 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