Wednesday, September 29, 2010

Bash Command

Oleh kerana skrg aku tgh bermain2 dgn linux,aku saje2 la nk post basic bash command.. harap2 dpt membantu para beginner linux..



1.For listing Folders....
use "ls" instead of "dir"

2. For Entering into Directory..
cd folder_name

3. For going back to root...
cd

4. for going back one step...
cd ..

5. For deleting Directory
rm folder_name

6. For Creating tar file...
tar cvf folder_name.tar folder_name

7. For Extracting
tar -xf folder_name.tar

8. For Transfering.. one server to other.. or from one site to other...
wget hTTp://www.yourhost.com/folder_name.tar

Yg ni plak cr2 nk bk pendrive..

Open your favorite terminal....btw this works in gnome and kde.


[imdeemvp@localhost imdeemvp]$ cd /mnt/ <-as user cd yourself to the mnt folder and become root to create directory
[imdeemvp@localhost mnt]$ su
Password:
[root@localhost mnt]# mkdir usbflash <- this created a directory in the mnt folder

[root@localhost mnt]# ls /mnt/ <-this command listed all my directories the mnt folder
cdrom cdrom1 floppy usbflash

[root@localhost mnt]# mount /dev/sda1 /mnt/usbflash <-this is the command to mount flash card reader

[root@localhost mnt]# ls usbflash <-this listed all the info in my usb flash card and this was the output:
bootex.log dns.bmp games and keys LinuxDocs01.21.04 pc's
dns2.bmp Documents LinuxDistributions_eBay my pics programs

then i just copied this to my home folder and i was done!

[root@localhost mnt]# umount /dev/sda1 /mnt/usbflash <-this unmounted my usb flash card
umount: /dev/sda1: not mounted
[root@localhost mnt]# exit

No comments:

Post a Comment