LinuxCommandLibrary

gc

runtime garbage collection trigger

TLDR

Run garbage collection

$ gc
copy
Force collection
$ gc -f
copy
Collect specific generation
$ gc [generation]
copy
Show collection stats
$ gc -v
copy

SYNOPSIS

gc [options]

DESCRIPTION

gc triggers garbage collection in various runtime environments and shell contexts. The specific behavior depends on the shell or language environment.
In PowerShell, gc is an alias for Get-Content. In other contexts, it may trigger memory cleanup operations. The exact functionality varies by system.
The command is context-dependent and may have different meanings across shells and environments.

PARAMETERS

-f, --force

Force garbage collection.
-v, --verbose
Show collection statistics.
--help
Display help information.

CAVEATS

Behavior varies by shell/environment. May be an alias. Check your specific shell documentation.

HISTORY

gc appears in various contexts as a command or alias. In shells like PowerShell, it's an alias for file operations. In other systems, it may relate to garbage collection.

SEE ALSO

cat(1), powershell(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community