Skip to content

Instantly share code, notes, and snippets.

@tecmaverick
Last active December 20, 2022 01:31
Show Gist options
  • Save tecmaverick/f334687e2e50ac6ee227daeef5b65134 to your computer and use it in GitHub Desktop.
Save tecmaverick/f334687e2e50ac6ee227daeef5b65134 to your computer and use it in GitHub Desktop.
Terminal Commands
################################################################################################
# Listing files
# Recursively lists all files within the current directory
find .
# Recursively list all files ending with extension .txt
find . | grep ".txt"
# List files within current directory with a specific extension
ls *.scala
################################################################################################
# Hardware
# Get the processor details
lscpu | grep -E '^Thread|^Core|^Socket|^CPU\('
cat /proc/cpuinfo
################################################################################################
# Listing file type\encoding
file <filename>
# Example Spark RDD checkpointed file
file part-00000
# outputs
# part-00001: Java serialization data, version 5
# View the contents of Java serialization file
xxd part-00000
################################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment