• 1 Post
  • 121 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle










  • Matriks404@lemmy.worldtolinuxmemes@lemmy.worldLOL
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    2 months ago

    The command after && runs only if the previous command returns non-error exit status (0), if pacman returns error the latter command won’t be executed.

    Additionally there’s probably a configuration option for sudo for it to not time out, but it doesn’t matter since you can just use systemctl reboot as a normal user to reboot your system (at least on Debian). If that’s too long I recommend to add this to your .bashrc (if you use Bash): alias reb='systemctl reboot' or something similar.









  • Matriks404@lemmy.worldtolinuxmemes@lemmy.worldAlias's rule
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    2 months ago

    I don’t think there’s any reason to use rmdir unless you write (Ba)sh scripts, and you want to make sure that the directory is indeed empty. Just use rm -r.

    Also note that you can use rmdir -p this/is/some/path to remove all nested directories including the parent (this here). But this will only work if there’s exactly one directory per parent directory, and the last directory doesn’t have any files (including directories). This might be helpful for some scripts.

    rmdir -r isn’t a thing, because that would invalidate the reason this command exists.