Link to home
Start Free TrialLog in
Avatar of Cyber IT
Cyber ITFlag for United States of America

asked on

Learning UNIX on my own.

I need some major help here ... I dont know where to even begin on this example.
Create a file with the following lines (where the ? is replaced with the appropriate information):

My PC is running: kernel ? release ?
My account is on file system ?
The available space on my file system is ?
The directories for this course are using ? of disk space.
The type of this file is ?
This system has been running for ? days ? min.
My uid is ?
I belong to group(s) ?
Append to this file your search path
Append to this file a line of  40 dashes
Change your command prompt and append the new setting to this file

I started with the following but not even sure if it is correct.

echo "My PC is running: kernel" `uname -s' "release" `uname -r`
echo "My account is on file system" `df -T, --print-type`
echo "The available space on my file system is" `df -h`  (df ~username)
echo "The directories for this course are using" `du` "of disk space"
echo "The type of this file is" `file`
echo "This system has been running for" `uptime`
echo "My uid is" `id`
echo "I belong to group(s)" `id -a`
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cyber IT

ASKER

i dont see the difference
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the difference is a ` (ASCII 0x60) where you have a ' (ASCII 0x27)
It's an EE policy not to do students' homeworks. If you need help on a specific matter, please ask. But don't ask for generic excercises' solutions.
He did say he was learning on his own - I assumed that precluded it's being homework
This is actually not homework and I understand your policy.
ozo:
Sorry I see it now. I meant to put `.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can do "df -t ~" to ensure you refer to your home directory. In bash, ~ means your home, ~fred is fred's home, ~root is root's home, and so on.
I meant "df -T ~"
Even better, nice tip duncan!
Thanks ...