A A
RSS

Archive | Linux / Unix

Set Permission Unix and Windows.

Tuesday, December 30, 2008

0 Comments

Windows

About attrib

Attrib allows a user to change the properties of a specified file. Using attrib, the user has the capability of changing the file to have any of the below attributes.

Read-only – allowing the file to be only viewed and not written to.

Archived – allowing Microsoft backup and other backup programs to know what files to backup.

Hidden – making the file invisible to standard users.

System – making the file an important system file.

Syntax :

Microsoft Windows 95, 98, and ME syntax

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.

Microsoft Windows 2000 and Windows XP syntax

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
/D Process folders as well.

Microsoft Windows 2000 and Windows XP recovery console syntax

Note: The below options are the available options in the Windows recovery console.

Changes attributes on one file or directory.

ATTRIB -R | +R | -S | +S | -H | +H | -C | +C filename
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
S System file attribute.
H Hidden file attribute.
C Compressed file attribute.

Examples :

attrib

Typing attrib by itself will display all files in the current directory and each of their attributes. If any file is hidden it will also display those files.

attrib +r autoexec.bat

Add the read-only attribute to the autoexec.bat file so it cannot be modified until the read only attribute is taken off. This is helpful for important system files or any other file that you do not want to have mistakenly edited or changed by another program.

attrib +h config.sys

Add the hidden attribute to the config.sys file causing it to be not be seen by the average user.

attrib -h config.sys

This command will do the opposite of the above command. Instead of hiding the file it will unhide the file if hidden.

Example :
Question:
How can I see hidden files in MS-DOS?
Answer:

While in the MS-DOS or the Windows command line navigate to the directory you wish to view hidden files in and type one of the below commands.

attrib

Typing the attrib command alone will display all files in the current directory with their attributes to the left of the directory path and file name. Files that have an “H” to the left are hidden files.

attrib | more

If there are too many files to list on one page adding “| more” to the end of the attrib command will display all files with attributes one page at a time.

attrib *.log

Finally, if you know the name of the file you’re looking for or what it contains adding it with or without wild characters will display all files with their attributes. For example, the above command would list any log file (including hidden files) with its attributes.

Unix File Permissions

The permission description can be in the form of a number that is exactly three digits. Each digit of this number is a code for the permissions level of three types of people that might access this file:

  1. Owner (you)

  2. Group (a group of other users that you set up)

  3. World (anyone else browsing around on the file system)

The value of each digit is set according to what rights each of the types of people listed above have to manipulate that file.

Permissions are set according to numbers. Read is 4. Write is 2. Execute is 1. The sums of these numbers give combinations of these permissions:

  • 0 = no permissions whatsoever; this person cannot read, write, or execute the file

  • 1 = execute only

  • 2 = write only

  • 3 = write and execute (1+2)

  • 4 = read only

  • 5 = read and execute (4+1)

  • 6 = read and write (4+2)

  • 7 = read and write and execute (4+2+1)

Permissions are given using these digits in a sequence of three: one for owner, one for group, one for world.


Linux Filesystem Hierarchy

Friday, August 10, 2007

0 Comments

This section will explanation about

Linux Filesystem Hierarchy

Get the Flash Player to see this player.

Basic Command For Linux

Wednesday, August 8, 2007

0 Comments

Perintah dasar di Linux PART III

id username Mencetak user id(uid) atau group (gid).

date Mencetak waktu atau merubah tanggal dan waktu pada komputer, contoh merubah tanggal dan waktu ke 2000-12-31 23:57 dengan perintah: date 123123572000

time Melihat jumlah waktu yg di tangani untuk penyelesaian proses + info lainnya.

who Melihat user yg login di komputer kita.

rwho -a Melihat semua user yg login pada network anda, layanan perintah ini harus di aktifkan jalankan setup pada root untuk mengaktifkannya.

finger user_name Melihat informasi user, coba jalankan:finger root

last Melihat user sebelumnya yg telah login di komputer.

uptime Melihat jumlah waktu pemakaian komputer oleh seseorang, terhitung proses reboot terakhir.

ps (=print status), Melihat seluruh proses-proses yg di jalankan user.

ps axu | more Melihat seluruh proses yg di jalankan, walaupun tanpa terminal control di tampilkan nama dari setiap user untuk setiap proses.

top Melihat proses yg berjalan dengan urutan penggunaan CPU.

uname-a Informasi system kernel anda.

free Informasi memory (dalam kilobytes).

df -h (=disk free), Melihat informasi pemakaian disk pada seluruh system (in human-readable form)

du / -h | more (=disk usage ), Melihat secara detail pemakaina disk untuk setiap direktory.di mulai dari root (in human legible form).

cat /proc/cpuinfo CPU Info, melihat file pada /proc directory yg bukan merupaka file nyata (not real files).

cat /proc/interrupts Melihat alamat interrupts yg di pakai.

cat /proc/version Versi linux dan informasi lainnya.

cat /proc/filesystems Melihat file system yg di gunakan.

cat /etc/printcap Melihat printer yg telah di setup.

lsmod (as root), Melihat modul2 kernel yg telah di load.

set | more Melihat enviroment dari user yg aktif.

echo $PATH Melihat isi dari variabel “PATH”, perintah ini dapat di gunakan untuk menampilkan variabel enviroment lain dengan baik. gunakan “set” untuk melihat enviroment secara penuh.

dmesg Mencetak pesan-pesan pada waktu proses boot.(menampilkan file :/var/log/dmesg.)

(CTRL)(ALT)(F1) pindah ke text terminal pertama, di linux anda dapat membukan beberapa terminal pada waktu bersamaan.

(CTRL)(ALT)(Fn) (n=1..6) pindah ke n text terminal.

(CTRL)(ALT)(F7) Pindah ke GUI pertama (jika hanya satu window yg aktif).

(CTRL)(ALT)(Fn) (n=7..12) pindah ke n GUI terminal jika GUI terminal aktif pada layar n-1.

(TAB) Autocomplete perintah (pada terminal), shortcut ini sangat bagus bekerja juga pada LILO prompt.

(ArrowUP) Scroll & edit perintah-perintah sebelumnya,lalu tekan [ENTER] utk menjalankan perintahnya.

(SHIFT+PgUp) Menggulung 1 layar ke atas pesan sebelumnya, dengan perintah ini dapat juga untuk melihat booup message.

(SHIFT+PgDown) Menggulung 1 layar ke bawah pesan sebelumnya,dengan perintah ini dapat juga untuk melihat booup message.

(+) (pada X-windows) merubah resolusi berikutnya pada X-server (jika anda men-setup lebih dari 1 resolusi pada file XF36Config.

(CTRL)(ALT)(+) (pada X-windows) merubah ke resolusi sebelumnya pada X-server.

(CTRL)(ALT)(Bkspc) (pada X-windows) menutup X-windows server,gunakan jika X-windows server crash, dan tidak dapat exit secara normal.

Basic Command For Linux

Wednesday, July 11, 2007

1 Comment

Perintah Dasar di linux PART II

pine Email reader yang sangat mudah di gunakan dah menjadi favorit banyak pemakai mesin unix, atau anda bisa pakai email yang sangat costumize,yaitu”mutt“.

talk username1
Berbicara dengan keyboard dengan user lain yang sedang login pada mesin kita atau (”talk username1@machinename” untuk berbicara dengan komputer lain). untuk menerima undangan percakapan,ketikan “talk username2“,jika seorang mencoba untuk berbicara dengan anda dan itu di rasakan menggangu anda bisa menggunakan perintah mesg” untuk menolak pesan tsb. dan gunakan perintah who atau “rwho” untuk melihat user tsb.

mc
Menjalankan MC sebagai file manager.

telnet server Untuk menghubungkan komputer kita ke komputer lain denganmenggunakan protocol TELNET,gunakan nama mesin or IP mesin, dan anda akan mendapatkan prompt login dgn syarat anda telah dapat account di mesin tsb, telnet sangat tidak aman karena setiap yang di ketik menjadi “open text” juga dengan password anda.

rlogin server remote login” menghubungkan anda dengan komputer lain, login name and password tetapi bila account anda sudah terpakai maka akan muncul kesalahan pada password anda.

rsh server remote shell” jalan lain untuk menghubungkan mesin anda ke remote machine,apabila login name or password sedang di pakai, maka password anda tidak berlaku.

ftp server ftp ke mesin lain, ini sangat berguna untuk mengcopy file ke atau dari remote mesin.
minicom
Program “minicom” dapat di katakan seperti “Procomm for linux“.
./program_name : Menjalankan program pada direktori aktif, yg tidak terdapat
pada “PATH anda.

xinit
Menjalankan X-window server (tanpa windows manager).

startx Menjalankan X-window server dan me-load default windows manager,sama seperti perintah “win” under DOS dengan win3.1.

startx — :1 Menjalankan sesi X-windows berikutnya pada display 1 (default menggunakan display 0).anda dapat menjalankan GUI terminal secara bersamaan,untuk pindah GUIf gunakan CTRL+ALT+F7 or CTRL+ALT+F8,etc tapi ini akan lebih banyak memakan memori.

xtrem (Pada X terminal),menjalankan X-windows terminal.untuk keluar ketikan exit“.

xboing (Pada X terminal) Hm.hm…mau tahu coba aja ^_^ mirip games-games lama.

gimp (Pada X terminal) program image editor yg sangat bagus,anda tahu Adobe photoshop gimp” itu masih sepupu kale yach..^_^.

netscape (Pada X terminal) menjalankan netscape.

netscape
-display
(Pada X terminal) menjalankan netscape pada mesin yg aktif dan menampilkan outputnya pada mesin,host:0.0 yang bernama “host” display 0 scree 0.anda harus memberi akses pada mesin aktif untuk menampilkannya pada mesin “host” dengan perintah xhost“.

shutdown -h now (sebagai root) shutdown sistem.umumnya di gunakan untuk remote shutdown.gunakan CRTL+ALT+DEL untuk shutdown pada konsol (dapat di jalankan user).

halt
reboot
(Sebagai root) halt atau reboot mesin.lebih simple dari perintah di atas.

man topic Menampilkan daftar dari sistem manual page (HELP) sesuai denga topic.coba man man“,lalu tekan “q” untuk keluar dari viewer.perintah “info topic” manual pages dapat di baca dilihat dengan cara “any_command –help“.

opropos topic Menampilkan bantuan manual berdasarkan topik.

pwd Melihat direktory kerja saat ini.

hostname Menampilkan nama localhost anda (mesin di mana anda sedang bekerja).gunakan perintah “netconf“(sebagai root) untuk merubah nama host dari mesin tersebut atau edit file di “/etc/hosts.

whoami Mencetak login name anda.

Basic Commad For Linux

Tuesday, June 19, 2007

0 Comments

Perintah Dasar di Linux: PART I

any_command –Menampilkan keterangan bantu tentang pemakaian perintah.”–help”sama dgn perintah pada dos.

help|more “/h”.perintah “more” di perlukan agar screen stop setiap 1 layar.

ls melihat isi file dari direktori aktif.pada linux perintah “dir” hanya berupa alias dari perintah “ls”.
untuk perintah “ls” sendiri sering di buatkan alias “ls–color”, agar pada waktu di “ls” di tampilkan
warna-warna sesuai dgn file-filenya,biasanya hijau untuk execute,dsb.

ls -al|more Melihat seluruh isi file pada direktori aktif beserta file hidden,lalu di tampilkan layar per layar.

cd direktory Change direktory.Menggunakan “cd” tanpa nama direktory akan menghantarkan anda pada home direktory
dan “cd-” akan menghantarkan anda ke direktory sebelumnya.

cp soure Mengopy suatu file
destination

mcopy source Mengopy file dari / ke dos filesystem (tanpa memerlukan mounting).Contoh mcopy a:\autoexec.bat
destination ~/junk. gunakan “man mtools” utk command sejenis, mdir,mcd,mren,mmove,mdel,mmd,mrd,mformat…

mv source Memindahkan atau mengganti nama file.
destination

ln -s source Membuat simbolic links.contoh “ln -sf/usr/X11R6/bin/XF86_SVGA/etc/X11/X. membuat simbolik links dari
destination file XF86_SVGA ke X

rm files Menghapus file

mkdir direktory Membuat direktory baru

rmdir direktory Menghapus direktory yg telah kosong

rm -r files (recursive remove) menghapus file, direktory dan subdirektory-nya.
hati-hati dalam menggunakan perintah ini apabila anda login sebagai root,karena root dapat dgn mudah
menghapus seluruh file pada sistem dgn perintah di atas,tidak ada perintah utk undelete di linux (belum)
Tetapi jika anda penasaran, coba saja perintah berikut as root : rm -rf/*

cat file name | Untuk melihat isi suatu file,dengan tambahan perintah more, maka isi file tersebut di tampilkan layar per layar
more

less filename Melihat isi suatu file layar per layar,dan tekan tombol “q” apabila ingin keluar,”less” hampir sama dgn perintah
cat filename |more

pico filename Edit suatu text file.

pico -w filename Edit suatu text file,dgn menonaktifkan fungsi word wrap,sangat berguna utk mengedit file seperti /etc/fstab

lynx file.html Melihat file html atau browser ke net dgn text mode,di mana gambar/image tidak dapat di tampilkan,
tapi lynx adalah suatu browser yg sangat cepat, sangat berguan bila anda hanya ingin menginginkan suatu artikel
tanpa image/gambar.

tar -zxvf Meng-untar sebuah file tar sekaligus meng-uncompress file tersebut(*.tar.gz or *tgz), untuk meletakannya ke direktory
filename.tar.gz yg di inginkan tambahkan option -C direktory, contoh :tar -zxvf filename.tar.gz -C /opt(meletakan file tersebut
di direktory /opt

tar -xvf Meng-untar sebuah file tar yg tidak terkompress(*tar).
filename.tar

gunzip filename.gz Meng-uncompress sebuah file zip (*.gz or *.z) dengan menggunakan gzip (juga zip atau compress) jika ingin mengkompress file.

bunzip2 Meng-uncompress file dgn format(*.bz2) dgn utiliti “bzip2″, di gunakan pada file yg besar.
filename.bz2

unzip filename.zip Meng-uncompress file dgn format (*.zip) dgn utiliti “unzip” yg kompatibel dgn pkzipj for DOS.

find / -name Mencari “namafile” pada komputer di mulai dgn direktory /.
“filename” Nama file tsb mungkin saja berisi wildcard(*,?).

locate filename Mencari dengan string “filename”.sangat mudah dan cepat dgn perintah di atas.

Advertise Here
Advertise Here
twittme

Rizq On Twitter

Just follow me...there ;)