Register
It is currently Sat Apr 19, 2014 3:25 am

Displaying the filesystem


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed Mar 26, 2008 5:52 am   

Joined: Sat Mar 22, 2008 11:51 pm
Posts: 5
Location: Nagpur, Maharasthra, India
Hello all,

I intend to write a shell script that will display the partitions & the respective file-systems. So I am planning to write a Shell Script as given below:

#!/bin/bash
fdisk /dev/sda

But My problem is that when I execute the above script, I am required to enter the "p" manually to display the partition table How can I automate that so that I don't need to enter "p" manually


Top
 Profile WWW YIM  
 PostPosted: Thu Mar 27, 2008 2:34 am   

Joined: Sun Aug 19, 2007 12:04 pm
Posts: 13
Location: Texas
if your just looking to list the partitions on a disk then
Code:
fdisk -l /dev/sda

;)
its good to look at those man pages/google first


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP