![]() ![]() For instance, the program can locate empty directories, temporary files, symbolic links and even conflicting names, to name just a few things. It can be employed as a duplicate photo finder but there are other helpful tasks it can carry out. A best practice for all production scripts is to never trust the PATH and to spell out the location of all commands to be run.Verdict: This free utility can be used on a range of OS distributions and varying software repositories which include Ubuntu as well. I would be concerned about trusting the PATH in a script like this. ![]() The file is part of my backup data too, so I have at least 90 days to review it, but often 180 days. I log everything to the same file each week - this makes seeing what happened should anything bad come to light following the patch much easier. It waits for my input for each system/apt command. ![]() I manually run it once a week while doing other things. so what is installed, removed, purged are logged there. Do what you feel is best.ĪPT has a history/log in /var/lib/apt/. I've been burned a few times by broken systems and systems that won't boot post-patching. I would warn against 100% automatic patching. That's basically when libc or a new kernel is installed. If that file exists, then a reboot is needed. On Ubuntu systems, a file is created in /var/run/reboot-needed. ![]() Is the update not running through all the repositories on some updates? The quest for knowledge continues.Ĭode: $ some command 2>&1 | tee /tmp/logLearn more about redirection from "The Art of the Command Linux" - a github repo. I'm still trying to figure out why sometimes the hit or get is 8 or 10, and sometimes as much as 45. If a package is not found in the repository, retuns ign, meaning it will ignore that 1, without a fatal error. If your packages are old, then returns get:#, indicating that it is 'getting' the new files. If your install packages are up-to-date, it returns hit:#, and nothing is downloaded. I did a little more research, and from what I can tell is the update compares the package file in your system with the ones in the repository. Grahammechanical, that's kind of what I thought. I am postponing the upgrade until later, because I have to close and relaunch 3 instances of the browser. I ran my script this morning and 1 of the upgradable pkgs is firefox. I opted for this script because I can see what is going on, again in the search for a better understanding of how things work, and to catch any errors that may occur. ml9104, I considered a 1 liner like the 1 you suggest, and putting it in root cron to run nightly,(would have to add the -y flag so as to not need my input). Questions Ģ) Why such a varied amount of each on each update.Īgain, not having an issue at this point, just trying to gain a little knowledge. Sometimes it lists 8 or 10, sometime 40+. When doing the updates, it comes up with get:1 or hit:5, etc. updates.sh: line 20: syntax error: unexpected end of fileDisregard the error message. Get:21 focal-backports/universe amd64 DEP-11 Metadata ĥ packages can be upgraded. Get:20 focal-backports/main amd64 DEP-11 Metadata Get:19 focal-updates/multiverse amd64 DEP-11 Metadata Get:18 focal-updates/universe amd64 DEP-11 Metadata Get:17 focal-updates/universe amd64 Packages Get:16 focal-updates/universe i386 Packages Get:15 focal-updates/main amd64 DEP-11 Metadata Get:14 focal-updates/main amd64 Packages Get:12 focal-security/multiverse amd64 DEP-11 Metadata Get:11 focal-security/universe amd64 DEP-11 Metadata Get:10 focal-security/main amd64 DEP-11 Metadata I had an issue with the script, which I was able to solve, but I copied the output to a text file.Ĭode: charles:$ sudo. mMy other questions are on the output of the apt update command. My question is can I do pipe and tee with the update and upgrade commands, and how to do that without truncating the file on each command.ģ) Is there a way to have the script tell if a reboot is needed. I know libreoffice, firefox, google-chrome, etc, but the lib# and others I can check into some other time. I don't know what most of that is, but saving to a file affords me a chance to research them. Is there an easier way to do this? My searchs find a lot of sed or awk methods, but much more typing, and a little confusing.Ģ) I have the upgradable list piped to tee, and saved to a file. Please run upgrade manually.ġ) lines 11 and 12 convert to upper case and strip all but first letter. Then echo "We will postpone upgrades for now."Įcho "Invalid selection. upgradable_list.txtĪnswer=$ #reads first letter only ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |