Remove files/folders. Not drop-in replacement for rm, though
Project description
Remove
- removes files
- prints out filepath
- logs filepath to syslog/sqlite
Motivation
- being able to clean up folders deep inside tree, like:
remove **/node_nodules - have some persistent logging on what being removed: in journald/syslog and in sqlite database
- get list of files to remove: from file
- get list of files to remove: from command
Alternative: rm -rf **/node_nodules
- Yes
- However we would not see what entries being removed
Alternative: rm -rfv **/node_nodules
- Yes
- But
rmwould log each file (insidenode_modules) in this case. - For a large
node_modules- the output is overwhelming. I just need to see which node_modules being removed and keep the output log readable.
Alternative:find and xargs
- yes
- But we will end up with rather longer command for a
trivialtask
Example
pip install ngm-remove
cd projects
remove **/node_nodules
journalctl -t remove -r
Use in scripts
- In scripts, you might need to use
shopt -s globstarto enable**globs
shopt -s globstar # feature available since bash 4.0, released in 2009
remove **/node_modules
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ngm_remove-0.0.7.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ngm_remove-0.0.7.tar.gz.
File metadata
- Download URL: ngm_remove-0.0.7.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8dbe37d51bbf9202e848db9d0c5e9d3e06ca5e47b3304caa84a87a1ef1b838b
|
|
| MD5 |
7f5381b0eba062df7f6300f169ef9bab
|
|
| BLAKE2b-256 |
3e615abb1b93f605e60b28e4f34653ac71d9850eef3afe6f160e3868af87e058
|
File details
Details for the file ngm_remove-0.0.7-py3-none-any.whl.
File metadata
- Download URL: ngm_remove-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb2bef068d2c859534e9c09f62ae3842dcddad328a4e9adea4d2f09b58a4252d
|
|
| MD5 |
f83fa9b38090dee0ba090d1745f4b165
|
|
| BLAKE2b-256 |
e21d652cfecc6f8ddda91505568101ca1a9dc9ae5fd09a9ba917a563dbbf0e8f
|