this post was submitted on 08 Aug 2023
16 points (100.0% liked)

linux4noobs

1340 readers
1 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 1 year ago
MODERATORS
 

You can backup your config files before editing them, like this:

cp configbeingedited.conf configbeingedited.conf__orig_datestring

This way, when things break or don't function how you like, you can easily copy the original config file back into position, restoring the original functionality.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Andy@programming.dev 2 points 1 year ago (1 children)

Some Zsh:

bak () {
  emulate -L zsh
  for 1 {
    cp -i $1 $1.bak
    ls -l $1 $1.bak
  }
}
[โ€“] ace_garp@lemmy.world 2 points 1 year ago

This is a clean way to make your own new command called 'bak', to automate making a second copy of the file.