Introduction
If you've read my previous post on the most common, yet useful, Linux commands and are looking for a bit more of a challenge, keep reading.
Here are eight of the more niche (but equally useful) command-line utilities in Linux.
Commands to Know
chmod [parameters] [mode] [filename]
change mode
modifies permissions across multiple files and directories
permissions:
r - read
w - write
x - execute
groups "affected":
u - owner
g - group
o - others
a - all
operators:
'+' - adds permission
' - ' - removes permission
'=' sets permission to value
ex:
chmod u+rw,go-r [file]
adds read and write permission to owner
removes read permission from group and others
ln [parameters] [original filename] [link name]
link
can be either soft or hard links
Hard Links
ln [original filename] [link name]
points to the physical data stored in the original file
useful for creating multiple access points to data without replicating that data (e.g. backing up data)
if original file is deleted or renamed, link still points to data
Soft Links
ln -s [original filename] [link name]
points to the original file itself
useful for creating shortcuts between files / directories
if original file is deleted or renamed, link points to nothing ("dangling link")
touch [parameters] [filename]
creates an empty file(s) of specified extension type
ex:
touch filename.txt
touch filename1.txt filename2.c filename3.py
similar to 'code' command exclusive to VSCode
Final Thoughts
Hopefully by the end of this article at least one of these commands has made its way into your software toolbelt. Thanks for reading!
Comments