LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2015, 09:35 AM   #1
handsome5217
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Rep: Reputation: Disabled
mount point


Lastly for bonus points, rick was hoping to list the system's configured mount points:
rick@rickws:~$#cat /etc/fstab | egrep -v ^#' awk '{ print $7 }
===
what is the error on here can any one help me please
 
Old 09-25-2015, 09:42 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,896

Rep: Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261Reputation: 4261
Quote:
Originally Posted by handsome5217 View Post
Lastly for bonus points, rick was hoping to list the system's configured mount points:
rick@rickws:~$#cat /etc/fstab | egrep -v ^#' awk '{ print $7 }
===
what is the error on here can any one help me please
Why don't you ask Rick what his solution was?

Better...please read the LQ Rules about posting the same question more than once, and about posting verbatim homework questions. We'll HELP you, but you have to show effort of your own.
 
Old 09-25-2015, 09:59 AM   #3
handsome5217
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Why don't you ask Rick what his solution was?

Better...please read the LQ Rules about posting the same question more than once, and about posting verbatim homework questions. We'll HELP you, but you have to show effort of your own.
i have done my best but unfortunately i cant think what is wrong here its really confusing if u cant at lest give me a hint please
 
Old 09-25-2015, 10:18 AM   #4
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 8,361
Blog Entries: 11

Rep: Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329
Try
Code:
mount
or
Code:
df -h
IDK what is in ricks' /etc/fstab, but mine here does not have a 7th field, so
Code:
cat /etc/fstab | egrep -v ^#'  awk '{ print $7 }
is wrong, Wrong, WRONG, It's missing a pipe and a closing single tick on the awk.
cat <something> | grep <something> is wasting keystrokes.
Try
Code:
grep -v ^# /etc/fstab
and work out from there.

Let us know.
 
Old 09-25-2015, 10:26 AM   #5
handsome5217
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Try
Code:
mount
or
Code:
df -h
IDK what is in ricks' /etc/fstab, but mine here does not have a 7th field, so
Code:
cat /etc/fstab | egrep -v ^#'  awk '{ print $7 }
is wrong, Wrong, WRONG, It's missing a pipe and a closing single tick on the awk.
cat <something> | grep <something> is wasting keystrokes.
Try
Code:
grep -v ^# /etc/fstab
and work out from there.

Let us know.
cat /etc/fstab awk '{ print $7 }'
this command thisplsy the mount points
 
Old 09-25-2015, 12:39 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,492

Rep: Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091
Quote:
Originally Posted by handsome5217 View Post
cat /etc/fstab awk '{ print $7 }'
this command thisplsy the mount points
No it doesn't, it's wrong all over the place. For one you STILL don't have the pipe that Habitual mentioned, and two there is no seventh column in /etc/fstab (the mount point is the second column). Here is the output of your command (with the pipe added in where it's supposed to be) on my machine:
Code:
$ cat /etc/fstab | awk '{ print $7 }'



Nov

maintained
mount(8)
It's just pulling out the seventh word from some of the comment lines.
 
Old 09-25-2015, 01:00 PM   #7
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 8,361
Blog Entries: 11

Rep: Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329Reputation: 2329
Since you haven't shown you trying
Code:
grep -v ^# /etc/fstab
with some "| awk" (work out from there)
I am done.
Ask Rick.
His code sucks and you can tell him I said so.

Check out
Code:
 man findmnt
End Transmission.

Last edited by Habitual; 09-25-2015 at 01:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB mount point is not shown in /dev entry point garryhk Linux - Software 3 12-12-2012 05:28 PM
How to mount a Windows shared directory and have mount point be owned by nonroot user Arodef Linux - Software 3 09-14-2009 12:23 AM
puppy+grub saves ram installed mount point as HD install mount point agualust Linux - Newbie 0 04-10-2009 11:23 AM
mount NFS to mount point then share out the mount point ionic_slim Linux - Networking 2 04-20-2008 12:17 PM


All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration