Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bashrc-alice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ debug-o2-compile() {
# Find runtime error messages in an execution log.
debug-o2-run() {
[ "$1" ] || { echo "Provide a log file"; return 1; }
grep -n -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " "$1"
grep -n -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "failed" -e "\\[WARN\\]" -e "Warning in " "$1"
}
2 changes: 1 addition & 1 deletion bashrc-server-admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ inactive-users-size() {
memory-ok() {
[ "$1" ] || { echo "Provide the minimum memory fraction"; return 1; }
frac_min="$1"
return "$(free | grep Mem | awk -v frac_min="$frac_min" '{print ($7 < $2 * frac_min) ? 1 : 0}')";
return "$(free | awk -v frac_min="$frac_min" 'FNR == 2 {print ($7 < $2 * frac_min) ? 1 : 0}')";
}

# Show n_proc processes taking the most memory.
Expand Down
2 changes: 1 addition & 1 deletion clean-tmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sudo apt clean
echo "Moving files to trash bin"
gio trash -f \
"$HOME"/.aliensh_history \
"$HOME"/.bash_history \
"$HOME"/.bash_history* \
"$HOME"/.cache/doublecmd/thumbnails/* \
"$HOME"/.cache/mintinstall/screenshots/* \
"$HOME"/.cache/thumbnails/*/*.png \
Expand Down
2 changes: 1 addition & 1 deletion shreddir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
[ -d "$1" ] || { echo "Directory $1 does not exist"; exit 1; }

echo "Shredding directory: $1"
find "$1" -depth -type f -exec "$(dirname "$(realpath "$0")")"/shred.sh {} \; && rm -rf "$1"
find "$1" -depth -type f -exec "$(dirname "$(realpath "$0")")"/shred.sh {} \;

exit 0
Loading