Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Read the filename portion of a path
Linux Commands: Read the filename portion of a path using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Recognize an untracked file
Git: Recognize an untracked file inside the disposable repository created by the input setup.
Git✓ Tested
Refresh a cached data attribute deliberately
jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.
jQuery✓ Tested
Refuse to overwrite an existing file with redirection
Bash Scripts: Noclobber makes a plain greater-than redirection fail when the target already exists.
Bash Scripts✓ Tested
Remove a filename extension
Keep the path while removing its final extension.
filename✓ Tested
Remove one known scratch file
C: Check remove’s return value instead of assuming deletion succeeded.
C✓ Tested
Remove only a named untracked scratch file
Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.
Git✓ Tested
Rename a file with mv
Linux Commands: Rename a known file in the current directory and inspect its new contents.
Linux Commands✓ Tested
Rename a known file
C: The standard rename function reports failure through its return value.
C✓ Tested
Rename a practice file
Linux Commands: Rename a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Render a semantic data table
Render a semantic data table with a small React component and explicit browser behavior.
React✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested