From: Bhaskar Chowdhury <unixbhaskar@gmail.com>
To: yamada.masahiro@socionext.com, michal.lkml@markovi.net
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
rdunlap@infradead.org, Bhaskar Chowdhury <unixbhaskar@gmail.com>
Subject: [PATCH] :scripts: prune-kernel : prunning kernel generalize way
Date: Tue, 15 Oct 2019 20:25:49 +0530 [thread overview]
Message-ID: <20191015145548.24165-1-unixbhaskar@gmail.com> (raw)
This patch will remove old kernels from system selective way.
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
scripts/prune-kernel | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/scripts/prune-kernel b/scripts/prune-kernel
index 74143f229f84..28fae6c91218 100755
--- a/scripts/prune-kernel
+++ b/scripts/prune-kernel
@@ -33,7 +33,7 @@ printf "\t\n Enlist the installed kernels \n\n\n"
cd $boot_dir && pwd
#Bash experts not recomend to run ls inside script,but you can by running that too
-# ls -1 vmlinuz-*
+# ls -1 vmlinuz-*
#This is the recommended way , little complex but that's what people want to see!
@@ -42,10 +42,10 @@ find $boot_dir -name "vmlinuz-*" -type f -print0 -exec ls -1 {} \;
printf "\n\n\n Well, we need to purge some kernel to gain some space.\n\n\n"
-printf "Please give the kernel version to remove: %s"
+printf "Please give the kernel version to remove: %s"
read kernel_version
-remove_old_kernel
+remove_old_kernel
printf "\n\n Remove associated modules too ... \n\n"
@@ -54,7 +54,7 @@ cd $modules_dir && pwd
printf "\n\n\n Enlist the installed modules \n\n\n"
#This is (-1) minus one not l(el)
-# ls -1
+# ls -1
find $modules_dir -name "$kernel_version-*" -type f -print0 -exec ls -1 {} \;
@@ -66,14 +66,14 @@ rm -rf $modules_version
printf "\n\n Done \n\n"
printf "\n\n Want to remove another?[Yn] : %s"
-read response
+read response
if [[ $response == "Y" ]]; then
- printf "Please give another version to remove : %s"
+ printf "Please give another version to remove : %s"
read kernel_version
-remove_old_kernel
+remove_old_kernel
elif [[ $response == "n" ]]; then
@@ -81,4 +81,4 @@ elif [[ $response == "n" ]]; then
fi
-exit 0
+exit 0
--
2.21.0
next reply other threads:[~2019-10-15 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 14:55 Bhaskar Chowdhury [this message]
2019-10-15 23:03 ` [PATCH] :scripts: prune-kernel : prunning kernel generalize way Randy Dunlap
2019-10-16 1:36 ` Bhaskar Chowdhury
2019-10-16 2:23 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191015145548.24165-1-unixbhaskar@gmail.com \
--to=unixbhaskar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=rdunlap@infradead.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox