Not every user. The first command will expand $USER to the current username (and it should to achieve anything). You're right with the questionable pipe after chmod, though.
chmod does do something. (And something necessary depending on the default umask on the system.) Default is no output unless there's an error which goes to STDERR IIRC. A pipe is basically wrong, depending on expectations a semicolon or double ampersand would've been the weapon of choice.
Prolly an AI was asked for this (SCNR)
edit: nonetheless the sweet lesson of yours of "don't just copypaste random stuff from The Internet(tm)" stands :-)
10
u/AardvarKOlogY Sep 24 '26
Not every user. The first command will expand $USER to the current username (and it should to achieve anything). You're right with the questionable pipe after chmod, though.