List PCI device with class and vendor/device IDs

for device in /sys/bus/pci/devices/*; do echo "$(basename ${device} | cut -c '6-') $(cut -c '3-6' ${device}/class): $(cut -c '3-' ${device}/vendor):$(cut -c '3-' ${device}/device)"; done
This is a quick replacement for lspci if you need to know what's in a given system but pciutils is not installed. You then need something that can look up the IDs from pci.ids if you want the verbose output.
Sample Output
00:00.0 0600: 8086:d132
00:03.0 0604: 8086:d138
00:08.0 0880: 8086:d155
00:08.1 0880: 8086:d156
00:08.2 0880: 8086:d157
00:08.3 0880: 8086:d158

By: Flameeyes
2012-04-13 03:26:02

What Others Think

After the most recent update in the Firefox GTK File, transferred exchange is demonstrating some extremely clear issues and erors. Hiring best custom coursework writing service is suggested. Now and again I am not even ready to transfer a record on that exchange which is very baffling.
tinakutch · 95 weeks and 1 day ago
Thank you for sharing this information. Your blog is really I like the quality of content written by your writers. Do share on social media. Sharing valuable content is always a good way to enhance knowledge. hyperbolic stretching
coolastro · 67 weeks and 1 day ago
It's great that now there are services that help students with homework. Because now there are many people who work and study at the same time and do not have time to write everything on their own. I, too, have been working as a writer for a long time, and I have enough reviews about my military essay that I constantly write but for different students. I read a lot of books, and develop my writing to be a good writer
stivenreed333 · 38 weeks and 6 days ago ????? ??? ????? ???? SEO ????? ????? ????? ???? ????? ????? ??? ???? ???? ??????? Search Engine Optimization ??? ????? ??????????? ?? ????? ?????????? ????? ????? ?? ????
seofox · 16 weeks and 3 days ago
seofox · 15 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: