FIND YOUR NEXT FEW LINES

Results for “save file”

Small, practical examples. Search by task or narrow things down below.

1970 snippets foundClear filters
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested
PythonFiles & paths

Read a text file

Open a UTF-8 text file and read its contents. A context manager closes the file automatically, even if reading fails.

file✓ Tested
C#Files & paths

Read a text file

Load a small text file into a C# string.

C#✓ Tested
GitCommit history & revision selection

Read commit subjects affecting one file

Git: Place the path after -- so Git limits history to the selected file.

Git✓ Tested
Linux CommandsArchive integrity & packaging

Read one archived file to standard output

Linux Commands: Use tar -O with an explicit member name instead of writing files to disk.

Linux Commands✓ Tested
Linux CommandsGetting Started

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
GitGetting Started

Recognize an untracked file

Git: Recognize an untracked file inside the disposable repository created by the input setup.

Git✓ Tested
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
Linux CommandsFiles & permissions

Rename a file with mv

Linux Commands: Rename a known file in the current directory and inspect its new contents.

Linux Commands✓ Tested
Linux CommandsGetting Started

Rename a practice file

Linux Commands: Rename a practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
GitMerging & replaying changes

Resolve a merge by writing the intended final file

Git: After a conflict, edit the result, stage it, and finish the merge commit.

Git✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested