LinuxQuestions.org
Help answer threads with 0 replies.
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 11-03-2017, 09:13 AM   #1
rustemotchiyev
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Please help


22. Create an alias called “aFindP”, that will display the line in the “ ps -ef” output where the “vsftpd” letters are found
I did this
alias aFindP- ‘ps-ef | grep vsftpd |’
and it didnt work

Last edited by rustemotchiyev; 11-03-2017 at 10:37 AM.
 
Old 11-03-2017, 10:08 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,944

Rep: Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810
Quote:
Originally Posted by rustemotchiyev View Post
22. Create an alias called “aFindP”, that will display the line in the “ ps -ef” output where the “vsftpd” letters are found
23. Create a script from the previous alias structure, use the following information:
• prompt the user for a process name to find
• use a read command to access this input
• build the correct command to find the location of the input name.
This command structure will look very similar to the alias line you created; however, you will use a variable name in the command. This will be a three line script.
Read the LQ Rules. We will help you, but we're not going to do your homework for you. Show SOME effort of your own and tell us where you're stuck.
 
Old 11-03-2017, 10:25 AM   #3
rustemotchiyev
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
i tried

i tried everything before even posting it i was hoping for help not for response that is no helpful
 
Old 11-03-2017, 10:31 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,944

Rep: Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810Reputation: 5810
Quote:
Originally Posted by rustemotchiyev View Post
i tried everything before even posting it i was hoping for help not for response that is no helpful
And we were hoping you would have shown effort of your own before posting. if you 'tried everything', you should have no problems posting what you tried here, then, should you?

And again, we are NOT going to do your homework for you. Help is one thing, but you're just asking someone to do your work/assignment for you.
 
Old 11-03-2017, 11:07 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,038
Blog Entries: 13

Rep: Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488
rustemotchiyev, welcome to LQ.

Please review the LQ Rules and specifically the one stating:
Quote:
  • Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
Your original post, prior to your edit did not illustrate any effort, and you did post the homework question verbatim.

As far as your update showing your attempt, your syntax is incorrect, you use the equals sign to assign a value to an alias, don't put a pipe at the end of it. My style is to use the same single quote at the end which I use at the beginning. I'm unsure if syntax doesn't care if you use a different single quote. I typically always use the left leaning single quotes on both ends of a term like that.

While you may feel that TB0ne's first reply to you was not helpful, it was to the effect that you were pointed to the site rules as well as informed that we'd be happy to help. Replying with an update that you felt it was not helpful isn't the best choice here. Meanwhile editing your original post to show the effort you had put forth, now does enable people to aid you and your efforts.

Last edited by rtmistler; 11-03-2017 at 11:09 AM.
 
1 members found this post helpful.
Old 11-03-2017, 11:31 AM   #6
RadicalDreamer
Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 988

Rep: Reputation: 478Reputation: 478Reputation: 478Reputation: 478Reputation: 478
bash-4.4$ alias --help
bash-4.4$ apropos alias
bash-4.4$ man bash
 
Old 11-03-2017, 01:05 PM   #7
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 289Reputation: 289Reputation: 289
Quote:
Originally Posted by rustemotchiyev View Post
i tried everything before even posting it i was hoping for help not for response that is no helpful
Hello!!! It seems like you may be genuine in trying to do these Linux/Unix commands.
But think of it this way: what if a friend/family wanted to visit you, but just said "I can't".
You would ask for info on what they tried, and in what way does it not work.
(maybe car won't work; what does car do exactly? Or maybe they need you to bring wheelchair! Or bus$ Or...)
Same here. Google this: linux man script
It starts a new shell, and logs to a file named typescript, unless you do like: script my22
which would log everything to a file named my22, for that number 22 you were trying.
**Finally, type the command exit when you are done with #22, to close the file.
Then, somehow post/attach my22, or use termbin.com to get a 4letter link to post.

LQ'ers are happy to help IF you show exactly what fails. Best wishes.

The 'soft skills' of communication, which you can learn here, will be of great value elsewhere!!!
Here's a book I liked, on 'soft skills': https://amazon.com/Key-Skills-Profes.../dp/0749468726

Also, read this, about CODE tags (or see BB code link at bottom of pages)
Did you do/try:
Code:
alias aFindP='ps -ef | grep vsftpd'
??? See: https://alvinalexander.com/blog/post...create-aliases
Linux is 'case-sensitive', unlike M$Win.

What Linux distro do you use? On your PC?
If you don't have Linux, look into VirtualBox.org

Last edited by !!!; 11-03-2017 at 01:40 PM.
 
Old 11-03-2017, 01:12 PM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,070

Rep: Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132
please do not modify your original post.
Also please tell us: which shell did you use? (bash/zsh/tcsh/???)
Furthermore: how did you test/try it - what did you expect, what's happened (instead)?
 
1 members found this post helpful.
Old 11-03-2017, 01:50 PM   #9
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 289Reputation: 289Reputation: 289
#5 should clarify: "append" may be ok, but the 'bad' intent to "cover-up" (hide something, which quoting exposes) is not ok.
 
Old 11-03-2017, 02:06 PM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,070

Rep: Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132Reputation: 4132
in general
Code:
ps -ef | grep <something>
can be replaced:
Code:
pgrep <something>
This is not exactly the same, but no alias required at all.
 
2 members found this post helpful.
Old 11-03-2017, 02:26 PM   #11
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,364

Rep: Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258
Quote:
Originally Posted by rustemotchiyev View Post
i tried everything before even posting it i was hoping for help not for response that is no helpful
As a tip, if you need support for anything -- be it computers, cars, leaking faucets, whatever -- "I tried everything" does not mean what you think it means.*
generally, somebody trying to help you may know something you do not -- in many cases you ask because you hope hey do. So you cannot, possibly, have tried everything or, on the off-chance that you did, they cannot help you anyway.


*I learned this in a discussion about tech support with people I later had to apologise to for not following their help properly. I felt stupid because I give (limited) tech support for a living.
 
2 members found this post helpful.
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 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