Posts

Showing posts from October, 2025

Unix Essential Commands

chmod command (change a file mode) Symbol and its meaning u -> user g -> group o -> others a -> all r -> read w -> write (and delete) x -> execute (and access directory) + -> add permission - -> take away/remove permission  $ chmod go-rwx biglist To remove read write and execute permissions on the file/directory biglist for the group and others $ chmod a+rw biglist To give read and write permissions on the file/directory biglist to all, $ chmod u+rwx,g+rw,o-rwx test.file Set multiple permission in single command $ chmod a+rwx directory/* To give permission to all files in a directory $ chmod -R a+rwx directory/* To give permission to all files/directories in a directory and its sub directories cut command printf "Hello\tworld\nHi\tthere\n" | cut -f 2 Outputs the 2nd element after splitting the tab separated columns. -f value starts from 1 echo 'key=value' | cut -d "=" -f 2 Outputs the 2nd element after splitting the st...