FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Copy a file to a folder
Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.
file✓ Tested
Create a directory tree
Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.
directory✓ Tested
Create a symbolic link
Create a relative symbolic link to a file and inspect its target with readlink.
symlink✓ Tested
Find files by extension
Search a directory tree for regular files with a particular extension and print their paths.
find✓ Tested
Show the current directory
Print the absolute path of your current working directory before running commands that depend on relative paths.
directory✓ Tested