cm0002@literature.cafe to Linux@programming.dev · 1 day agoWhat are some of your most useful or favorite terminal commands?message-squaremessage-square30fedilinkarrow-up132arrow-down13file-text
arrow-up129arrow-down1message-squareWhat are some of your most useful or favorite terminal commands?cm0002@literature.cafe to Linux@programming.dev · 1 day agomessage-square30fedilinkfile-text
minus-square[object Object]@sh.itjust.workslinkfedilinkEnglisharrow-up15·edit-21 day agoI have a script named d in my PATH and it contains this: ("$@" > /dev/null 2>&1 &) It allows me to run any program in a fully detached state in a way that works even if the terminal that started the program closes, and it’s as simple as d <command>.
minus-squareGobbel2000@programming.devlinkfedilinkarrow-up1·7 hours agoHow does this even work? I get the redirection part, but how is the command executed in a detached state?
minus-squareMadhuGururajan@programming.devlinkfedilinkEnglisharrow-up1·edit-22 hours agothe last & is like doing “command &”. d is a function that takes argument and $@ is usually the first argument
minus-squareredjard@lemmy.dbzer0.comlinkfedilinkarrow-up5·21 hours agogood idea, I’ve been manually typing out variations of this as needed for years.
I have a script named
din my PATH and it contains this:("$@" > /dev/null 2>&1 &)It allows me to run any program in a fully detached state in a way that works even if the terminal that started the program closes, and it’s as simple as
d <command>.How does this even work? I get the redirection part, but how is the command executed in a detached state?
the last & is like doing “command &”. d is a function that takes argument and $@ is usually the first argument
good idea, I’ve been manually typing out variations of this as needed for years.