Openscapes / Openscapes/openscapes.cloud
Hub admin - removing core files
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
With this I can find and delete core dumps. Uses find to find files that match the pattern of core. followed by 1-8 digits, then uses file to list the file attributes, and pipes to grep to look for the string core file to confirm it is a core dump. Then use sed to extract the file name from the file output. Store the list of files in a variable; check the list to make sure it looks ok, then pipe into rm via xargs:
core_files_to_delete=$(
file `find -type f -regextype posix-extended -regex ".+/core\.[0-9]{1,8}"` |
grep "core file" |
sed 's/\(.*\/core[.][0-9]\{1,8\}\):.*/\1/'
)
# list the files, do a manual inspection
echo "$core_files_to_delete" | xargs ls -lh
# See the total size in bytes
echo "$core_files_to_delete" | xargs ls -lrt | awk '{ total += $5 }; END { print total }'
# delete them
echo "$core_files_to_delete" | xargs rm
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The only implementation reference is the inline shell command using find, file, grep, sed, xargs, ls, awk, and rm; start by locating any existing Hub-admin entry point in the repository. No target file, test, or acceptance criteria are named, so confirm where this belongs and what verification is expected before changing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100