Linux command cheats

Remote desktop (rdesktop):

To open a remote desktop over rdp with required window dimension (1280×960 in this example):

root@kali:/media/root/PWK# rdesktop -u offsec -p CEmbxkhMQ1Z -g 1280x960

Change file owner/group (chown):

     chown [-fhvx] [-R [-H | -L | -P]] owner[:group] file ...                   
     chown [-fhvx] [-R [-H | -L | -P]] :group file ...

chown localshare:localshare demo

We can see that the new owner of demo folder is localshare. But does this change apply to sub folders??? No… child folders/files are still owned by previous owner/s as below:

To change the owner for all content in folder:

chown -R localshare:localshare demo