- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How to grep non matching line in linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:06 AM
тАО09-24-2008 05:06 AM
How to grep non matching line in linux
I want to grep non matching lines for particular subdirectory.For ex:
I have subdirectory name called(target) like this
ae/mfs/bcd_io/target
ae/cfs/bcd_io/target
so i have used the following command for non-matching lines
#ls | grep -v target
But it is showing the target subdirectory.
Can anyone help me out in this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:12 AM
тАО09-24-2008 05:12 AM
Re: How to grep non matching line in linux
in which directory do you execute
ls |grep -v target
?
btw: this is hpux forum...
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:13 AM
тАО09-24-2008 05:13 AM
Re: How to grep non matching line in linux
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:14 AM
тАО09-24-2008 05:14 AM
Re: How to grep non matching line in linux
grep -v target
target(subdirectory)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:44 AM
тАО09-24-2008 05:44 AM
Re: How to grep non matching line in linux
drop the ls command and use find:
mkdir -p ae/mfs/bcd_io/target/sub1 ae/cfs/bcd_io/target/sub2
find ae | grep -v target
ae
ae/mfs
ae/mfs/bcd_io
ae/cfs
ae/cfs/bcd_io
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2008 05:27 AM
тАО09-25-2008 05:27 AM
Re: How to grep non matching line in linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 12:48 AM
тАО10-27-2008 12:48 AM
Re: How to grep non matching line in linux
How about using diff dir_1 dir_2
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 05:41 AM
тАО10-27-2008 05:41 AM
Re: How to grep non matching line in linux
ls !(target)