All Questions
Tagged with file-system bash
40 questions
7
votes
3
answers
293
views
lndir shell function - hardlink two directories
The code works, but I could use help testing it more comprehensively and double-checking that everything I'm doing makes sense, and that all the options can coexist with each other. I'm running into ...
5
votes
2
answers
95
views
Clean up and datestamp file names
I would like to ask for a review of the following Bash script which cleans up and datestamps file names, with an optional feature to rename the file.
The main use case is renaming files downloaded ...
1
vote
2
answers
138
views
Display free disk space
With Kubuntu 22.04 ...
Questions :
What is a better way than using 2 cases?
The 1st case, script Line 48 "case $x in"
lets user choose to clear screen or not clear.
The 2nd case, script ...
4
votes
2
answers
159
views
ds - directory switcher - a *nix command line utility for tagging the directories and switching between them via tags (Perl + bash)
I have this program for tagging directories and switching between the folders via tags. The front end is written in Bash (version 4.4.23) and the back end in Perl (5.26.1).
Critique request
Since this ...
1
vote
0
answers
57
views
Swap a symbolic link with its target
This program takes a symbolic link as argument, and swaps the link with its referent. For example, given a -> b, the result will be ...
5
votes
1
answer
149
views
build multiple websites with yarn
This is a Bash script that runs commands which builds code using the parameters given.
Code
The task:
I have multiple instances of websites which need to be build individually using individual yarn ...
2
votes
3
answers
64
views
Write directory new entries to file periodically, keeping the ones that existed in the past
Some backup Bash script on my machine copies a specific directory entries filenames into a text file. Entries that no longer exist have to be kept (entries added during a previous run).
The script ...
2
votes
0
answers
56
views
Bulk File Rename; Improved Safety and Performance
A function that funnels all filenames into a file and opens that file in vim. The user then changes the names, saves, and quits. Finally the function renames the files in the folder with the new names ...
7
votes
2
answers
1k
views
Backup with Hanoi Strategy
I want your suggestions about this shell script. I use it to backup some configurations on my home media server.
What improvements would you do? Keep in mind, I want to optimize space and speed and at ...
3
votes
2
answers
3k
views
Bash on Synology - Delete recycle bin entries over X days old
Synology NASs have a Task Scheduler that allows you to schedule deletion of files over X days old from recycle bins. This feature isn't working for me–running the task results in no files being ...
3
votes
1
answer
29
views
Tagging the directories and switching between them by tags - follow-up (Part 2/2: business logic)
This is the bash script responsible for changing the directories via textual tags. (See here the entire project.)
dt_script
...
5
votes
1
answer
303
views
Script to clean up old files that should only run one instance
I'm writing a bash script for deleting old files on a Linux server. Here are some relevant facts about this script:
As currently written, it does work as expected. However, it's entirely possible ...
3
votes
0
answers
198
views
Follow-up: Script to create symlinks for dotfiles in a Git repository
This is a follow up to my previous question on Code Review. I did try to implement most of feedback provided by thiagoalessio.
This is what my updated code looks like:
...
5
votes
1
answer
1k
views
Script to create symlinks for dotfiles in a Git repository
I have a GitHub repository containing all my dotfiles for bash, tmux and neovim. I'm using a ...
1
vote
1
answer
491
views
Checking the status of a ZFS pool
I'd like to see if there are any suggestions on how to improve a simple conditional test at the beginning of a backup script that verifies a ZFS volume is "online" and has the name "tank".
For ...