CMD Explain
# Create symbolic link
ln -s /path/to/original /path/to/symlink
βββββββββ¬ββββββββ
βββ the path to the original file/folder
can use . or ~ or other relative paths# Copy directory & contents to another place (-r for recursive)
cp -r /path/to/dir /path/to/wheretocopy# Preview output of script.
# Piping things into less will preview the content
curl https://21.co | less# Move everything from one dir to another.
# i.e. move all files in Downloads to Desktop. * after folder means select everything
mv -v ~/Downloads/* ~/Desktop/# Get full path to file
realpath <file># Do regex replace (with perl) on a file
perl -pi -e "<regex>" <file>
# i.e.
perl -pi -e "s/^\s*\{[^\n']*'([^\n']*)'[^\n']*'([^\n#']*)#[^\n']*'[^\n'}]*\},?/'\1', '\2'\n/gm" triggers.jsLast updated
Was this helpful?