Unix & Linux Stack Exchange Community Digest

Top new questions this week:

How can I disable `v` keybinding in less?

When I use less and press v it switches into the currently set editor (Emacs or vim). MISCELLANEOUS COMMANDS v Edit the current file with $VISUAL or $EDITOR. Is it possible to prevent this ...

less  
user avatar asked by alper Score of 14
user avatar answered by Stephen Kitt Score of 16

Can't create files or directories that starts from 'com1' to 'com9'

I can't create folders or files named 'com1', 'com2', ..., 'com9' in my extended hard drive. I'm trying to create a Wine prefix on my other drive where my games are stored, but I get some errors. ...

files filesystems filenames wine  
user avatar asked by snich Score of 13
user avatar answered by user4089 Score of 24

Why does my SSH Known Hosts have hashes instead of hostnames or IPs?

I have a host behind a dynamic IP, so I used to have a script that would add its address to my .ssh/known_hosts file, recently though it seems like something has changed. My file looks like its been ...

ssh openssh  
user avatar asked by fny Score of 11
user avatar answered by Alex Barton Score of 9

In POSIX scripting, is x=$y always equivalent to x="$y"?

Are x=$y and x="$y" always equivalent? Didn't know how to search for this. So far, I've always been using x="$y" to be "on the safe side". But I used x=$1 at one point ...

shell-script scripting variable posix assignment  
user avatar asked by rattlesnake Score of 9
user avatar answered by Kusalananda Score of 9

Is there a reserved word for datetime for the start of the day?

man date won't show me any reserved words but they have 'now' or 'today' etc. I wonder if there is any clear way to print start(00:00:00) of the day. Will date -u -d "$(date +'%F')" suffice ...

date  
user avatar asked by Lunartist Score of 6
user avatar answered by Stéphane Chazelas Score of 10

Why jobs lost when after reconnect ssh?

I have a job that runs in the background via ctrl + z and bg, and after reconnecting ssh I cannot find that job in the jobs command but can find it in ps grep. For now, I searched this and I get the ...

linux tmux background-process jobs  
user avatar asked by Yang Xu Score of 6
user avatar answered by Kamil Maciorowski Score of 14

How can I make Linux generate different MAC addresses for different bridge devices which are on different PCs?

I have just upgraded two servers from Debian 10 (Buster) to Debian 11 (Bullseye). Afterwards, I could not reach either of them via the network any more. After some investigation, the following problem ...

debian bridge mac-address  
user avatar asked by Binarus Score of 5
user avatar answered by A.B Score of 6

Greatest hits from previous weeks:

Match exact string using grep

I have a text file: deiauk 1611516 afsdf 765 minkra 18415151 asdsf 4152 linkra sfsfdsfs sdfss 4555 deiauk1 sdfsfdsfs 1561 51 deiauk2 115151 5454 4 deiauk 1611516 afsdf ddfgfgd luktol1 4545 4 9 luktol ...

grep  
user avatar asked by user3334375 Score of 121

How do I make `ls` show file sizes in megabytes?

What commands do I need for Linux's ls to show the file size in MB?

linux ls  
user avatar asked by Paul Sheldrake Score of 783
user avatar answered by user Score of 903

Delete the last character of a string using string manipulation in shell script

I would like to delete the last character of a string, I tried this little script : #! /bin/sh t="lkj" t=${t:-2} echo $t but it prints "lkj", what I am doing wrong?

shell-script string  
user avatar asked by user3581976 Score of 260
user avatar answered by steeldriver Score of 142

What is the "eval" command in bash?

What can you do with the eval command? Why is it useful? Is it some kind of a built-in function in bash? There is no man page for it..

bash shell eval  
user avatar asked by LanceBaynes Score of 290

Adding two numbers using expr

I'm learning Shell scripting for a diploma in IT I'm currently doing. I'm trying to write a small script that adds two numbers as shown as in one of the tutorials we were given. echo "Enter two ...

shell-script  
user avatar asked by Isuru Score of 16
user avatar answered by Ulrich Dangel Score of 46

How to display `top` results sorted by memory usage in real time?

How can I display the top results in my terminal in real time so that the list is sorted by memory usage?

terminal memory top  
user avatar asked by Theodor Coogan Score of 539
user avatar answered by Ramesh Score of 629

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  
user avatar asked by αғsнιη Score of 212
user avatar answered by αғsнιη Score of 337

Can you answer these questions?

How to setup tang/clevis failover on headless debian?

Goal: I want to run a debian host with NBDE/FDE: For decryption it should check for a tang server first. If not available it should fallback to manual decryption via SSH (busybox or the like). ...

boot initramfs disk-encryption  
user avatar asked by pico_prob Score of 1

Remove duplicates from database output

Assume you have three tables in a database: name, email and phone. If you join these tables you may get following output: Alice Miller, alice@it.com, 12345 Alice Miller, am@uni.edu, 12345 Alice Miller,...

bash awk sed postgresql  
user avatar asked by Harald Lichtenstein Score of 1

Open new terminal with environment specified by source command

I want to run a command that opens a terminal and sources into it a set of variables. How can I do this? I'm using xfce4-terminal. It has a command-line arg "--command", to execute commands ...

bash terminal environment-variables source xfce4-terminal  
user avatar asked by markling Score of 1
user avatar answered by terdon Score of 0
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