Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Say I was using the above command to find a file, how would I adjust the command to make each result have the file type displayed? I'm guessing it would involve piping the output to the file command somehow, but not sure?
What do you mean how would you get it to display the file type? You already limited to type f. Do you mean how do I check if it is executable or something else? I suspect the -ls flag maybe the answer but not entirely certain what it is you are after.
Nah, not "check what this can do."
I didn't fully understand what you meant with the type is file (obviously, but there are different files) and what you meant with extensions (which are not needed nor recommended, at least as far shell scripts are concerned).
Hence i quoted that part, not the explanations about find usage (which never hurts, imho).
Nah, not "check what this can do."
I didn't fully understand what you meant with the type is file (obviously, but there are different files) and what you meant with extensions (which are not needed nor recommended, at least as far shell scripts are concerned).
Hence i quoted that part, not the explanations about find usage (which never hurts, imho).
yeah I thought of that extensions thing after I posted too Because Linux does not put a .exe or anything on it even a shell script to get it to work. myshellscript.sh that was established only for reasons for easy and quick identification. Not so that it's actually "work", execute that is.
left over windows idealism I think is the source of my take on what s/he meant by file type. Though their is the .conf .ini and other such file types within Linux too one needs to take into consideration here. Now that my brain is thinking Linux and not Windows.
Read the LQ Rules....open new threads for new questions, and also read the "Question Guidelines". We're happy to help you, but these sound a LOT like verbatim homework questions..what effort have you put into this? Reading the man pages on commands would tell you a good bit, as with the find question you initially posted.
And to get the IP, you could use awk, split, grep, sed, or a combination of those things...along with others. What have you done/tried so far?
Read the LQ Rules....open new threads for new questions, and also read the "Question Guidelines". We're happy to help you, but these sound a LOT like verbatim homework questions..what effort have you put into this? Reading the man pages on commands would tell you a good bit, as with the find question you initially posted.
And to get the IP, you could use awk, split, grep, sed, or a combination of those things...along with others. What have you done/tried so far?
Thanks, sorry about that, will read the guidelines
I've tried a few of those commands, and also cut. Genuinely stumped on this. It's not homework, it's a kind of quiz, that permits "research" so I don't think I'm doing anything wrong. Not looking for exact answers, just a nudge in the right direction. I guess I should just read the man pages for all the aforementioned commands a bit more thoroughly
Thanks, sorry about that, will read the guidelines
I've tried a few of those commands, and also cut. Genuinely stumped on this. It's not homework, it's a kind of quiz, that permits "research" so I don't think I'm doing anything wrong. Not looking for exact answers, just a nudge in the right direction. I guess I should just read the man pages for all the aforementioned commands a bit more thoroughly
No worries, and yes, research is always the key to learning better. The options can get confusing, and we're always happy to explain things if you're stuck. The man pages are always a good starting point...unless you try looking at the ones for sed and awk, both of which can be hideously complicated, and are both very powerful commands. I think there's even an entire book written on them: http://shop.oreilly.com/product/9781565922259.do
As a hint, look at the "-F" flag for awk, then look at your input string. See anything common at the beginning/end of what you're after that you can use as a field-separator?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.