Wednesday, March 26, 2008

OneAndOneIs2 - Why doesn't Linux need defragmenting?

Really Simple and easy explanation!!

OneAndOneIs2 - Why doesn't Linux need defragmenting?

Wednesday, March 19, 2008

Access Samba shares from the Terminal

Useful when you want to use PuTTy to access your machine at home from work and you want to connect to another machine on your home network!..

To view your Samba Shares:
smbtree


If your share requires authorization: (enter the password when it prompts you)
smbtree -U=administrator


To connect to the share:
smbclient //bastille/ToyBox


If your share requires authorization: (enter the password when it prompts you)
smbclient //bastille/ToyBox -U administrator



Now you can use FTP commands. Some important ones:
Change to a 'local' directory
lcd /home/wraith/temp


Copy a remote file to the 'local' directory
get myremotefile.txt


More commands:
FTP, File Transfer Protocol - Summary of Commands

Sunday, March 9, 2008

Parted: How To Resize a Partition

Usually you'd use GParted Live CD to make life easier, but just incase you ever need to use the command line for partitioning..

If /dev/hda1 is the device on which to resize the partition:
parted /dev/hda1

View the current partition table to determine the minor number of the partition to resize as well as the start and end points for the partition:
print

To resize the partition, use the resize command followed by the minor number for the partition, the starting place in megabytes, and the end place in megabytes. For example:

resize 3 1024 2048

NOTE: Some systems will display the information as :
NUMBER    START         END             AND SO ON...
10 32kB 40GB HFS+
In this case, (to resize from 40GB to 20GB) type:
resize 10 32kB 20GB

After resizing the partition, use the print command to confirm that the partition has been resized correctly, is the correct partition type, and is the correct file system type.

After rebooting the system into normal mode, use the command df to make sure the partition was mounted and is recognized with the new size.

NOTE: NTFS gives an error message
No Implementation: Support for opening ntfs file systems is not implemented yet.
Sorry, I haven't discovered a solution to this yet.


Ref: http://linuxpoison.blogspot.com/2008/03/howto-resize-partition.html