Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
The del-cli package is a command-line tool for deleting files and directories using glob patterns. It is a convenient wrapper around the 'del' module, making it easy to use from the command line.
Delete files
This feature allows you to delete a specific file by providing its path.
del-cli 'path/to/file.txt'
Delete directories
This feature allows you to delete an entire directory and its contents by providing the directory path.
del-cli 'path/to/directory'
Use glob patterns
This feature allows you to use glob patterns to delete multiple files that match the pattern. For example, this command deletes all .txt files in the specified directory.
del-cli 'path/to/files/*.txt'
Force delete
This feature allows you to forcefully delete files or directories that are normally protected. Use with caution.
del-cli 'path/to/file.txt' --force
Dry run
This feature allows you to perform a dry run, showing which files would be deleted without actually deleting them. This is useful for testing your glob patterns.
del-cli 'path/to/files/*.txt' --dry-run
Rimraf is a deep deletion module for node (like `rm -rf`). It is more focused on being a programmatic solution rather than a CLI tool, but it can be used from the command line as well. Rimraf is very robust and handles edge cases like long paths on Windows.
Trash-cli is a command-line tool that moves files and directories to the trash instead of permanently deleting them. This can be safer as it allows for recovery of accidentally deleted files. It is a good alternative if you want a safer deletion process.
Shx is a wrapper around ShellJS Unix commands, providing cross-platform compatibility for shell commands. It includes a `rm` command that can be used to delete files and directories. Shx is useful if you need a broader set of shell commands in addition to deletion.
Delete files and directories
Useful for use in build scripts and automated things.
Note that this does permanent deletion. See trash-cli
for something safer.
$ npm install --global del-cli
$ del --help
Usage
$ del <path|glob> …
Options
--force, -f Allow deleting the current working directory and outside
--dry-run, -d List what would be deleted instead of deleting
Examples
$ del unicorn.png rainbow.png
$ del "*.png" "!unicorn.png"
:warning: Windows users: Since
$ del
is already a builtin command on Windows, you need to use$ del-cli
there.
FAQs
Delete files and directories - Cross-platform
The npm package del-cli receives a total of 264,208 weekly downloads. As such, del-cli popularity was classified as popular.
We found that del-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.