Skip to content
Advertisement

Tag: file-management

Understanding Unix Owner and chmod 777

I understand, Unix has 3 levels of ownership: Owner, Group, and Others. The owner is the one who creates the file and later on this Ownership can be moved using ‘chown’. However, I am confused with chmod 777 to ‘others’ or ‘groups’. Executing the previous command on a file will also allow the users in the group/other to have the

Delete all files except a few using bash command

I have a directory containing lot of files in different formats. I would like to know how I can delete all files with specific format (Lets say *.dat) except a few files in a same format (e.g. A.dat and B.dat). Please advise! Answer I’d write a little script (as a command-line one-liner it is slightly too big): As an alternative,

Advertisement