Skip to main content

Remove files/folders. Not drop-in replacement for rm, though

Project description

Remove

  • removes files
  • prints out filepath
  • logs filepath to syslog
  • optionally, logs to sqlite database

Motivation

  • being able to clean up folders deep inside tree: remove **/node_nodules
  • we could do this via normal rm -rf **/node_nodules, however we would not see what entries being removed
  • rm command has -v option to display removed entry. And we could use rm -frv **/node_modules. But rm would log each file 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.
  • we could use find and xargs - but we will end up with rather longer command for a trivial task

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 globstar to enable ** globs
shopt -s globstar # feature available since bash 4.0, released in 2009
remove **/node_modules

Project details


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.6.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ngm_remove-0.0.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file ngm_remove-0.0.6.tar.gz.

File metadata

  • Download URL: ngm_remove-0.0.6.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for ngm_remove-0.0.6.tar.gz
Algorithm Hash digest
SHA256 37cc1255bdd39da6477a1e694035abe2fbf5d7ce6ff3281bdc88376badf380c8
MD5 040ddb5a66bbf40a56531fa7c1615e35
BLAKE2b-256 fe5e91b5ad02b87c0214b0f3a9bc274fbfa511ef5156c434be335cb18fa38579

See more details on using hashes here.

File details

Details for the file ngm_remove-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for ngm_remove-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dc128bc97e54ce114f94767cc6d64eabacced0311a99f1ff8a6d59df58b47d2c
MD5 f63996c8333ace170a6bf4c8933ef9b7
BLAKE2b-256 a2c21c8cd4e906f8a4110d0ea419c37a48589bfb8d19867498273d331bea9457

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page