Chown with folder/file name

Example you have a folder or file name at /home

abdillah             fauzan            kjbi           rosmaniar
adbis                fehmeed           kji            sekretariat
admin                fikri             kmk            sekretariatpd1
admniaga             grafika           kopma          sekretariatpd2
agah                 gretha            ksa            sekretariatpd3
agung                hani              ksm            sekretariatpd4

and then you want that folder/file get owner same as folder/file name.

Try this:

  1. cd /home
  2. Type at terminal:
     for file in *; do
    chown  -R $file'.pnj' $file;
    done
  3. Finish :-)

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

0 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.