directory command linux notes

berikut command yang mungkin digunakan untuk bekerja di direktori

— Memindahkan folder naik satu level / move folder up one level sumber

$ mv myFolder/* .

misalkan data tersebut ada di /home/myUser/myFolder, jalankan perintah tersebut dari /home/myUser
jika berada di dalam direktorinya gunakan command dibawah ini
$ mv * ../

— manajemen file di server dengan sftp

sftp://[ipserver]/path/…

paste address diatas pada Caja address bar.
syarat: terinstall openssh-server

contoh praktis pemakaian sftp, misalnya anda ingin mengedit coding puppet di server yang hanya text based only, anda hanya perlu instal Geany (code editor)
buka explorer (apapun namanya sesuai distro anda)

sftp://[ipServer]/etc/puppetlabs/code/environments/production/modules/copy_config/manifests

— SCP untuk copy file antar server via command line

contohnya akan mengkopi folder desktop ke komputer dengan IP 192.168.1.10 dan di taruh di folder a pada Desktopnya

$ scp -r Desktop/ root@192.168.1.10:/home/myUser/Desktop/a

option -r diperlukan karena akan mengkopi folder

apabila anda mengkopi file

root@192.168.0.11:/home/user1/Desktop# scp file1.gif user2@192.168.0.10:/home/user2/Desktop/a/

 

— chmod gampang diingat – more

The easiest way is to do:

chmod -R u+rwX,go+rX,go-w /foo

which basically means:

to change file modes -Recursively by giving:

  • user: read, write and eXecute permissions,
  • group and other users: read and eXecute permissions, but not -write permission.

Please note that X will make a directory executable, but not a file, unless it’s already searchable/executable.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s