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.
K, I am stuck on my teachers 2nd question. I have 10 tabs open and none of them are helping get the answer.
He wants me to run the command
$ apropos calendar
here is the output
Code:
Curses::Widgets::Calendar (3pm) - Calendar Widgets
cal (1) - displays a calendar and the date of Easter
calendar (1) - reminder service
Date::Calc (3pm) - Gregorian calendar date calculations
Date::Calendar (3pm) - Calendar objects for different holiday schemes
Date::Calendar::Profiles (3pm) - Some sample profiles for Date::Calendar and Date::Calendar::Year
Date::Calendar::Year (3pm) - Implements embedded "year" objects for Date::Calendar
evolution (1) - groupware suite for GNOME containing e-mail, calendar, addressbook, to-do ...
ncal (1) - displays a calendar and the date of Easter
He then wants me to put this output into a newfile
I created the newfile folder, but every command I have tried is just renaming the folder and not actually putting the contents of calendar into the newfile.
I am using
cat
ls
touch
mv
but none of these are actually taking the output of calendar and inputting them into newfile.
He wants us to use the info and man pages to figure out to do it, but they aren't helping, or I do not see where the answer is. Can anyone give me better direction before I just email him?
Use the apropos command to get a list of utilities related to "calendar" (as a keyword) and redirect the output to another file. Make a note of the file name. What was the command?
What I dont know is how. Do you mean with a ">" character? Such as cat calendar > newfile
or replace cat with mv, cp, touch, etc? Because those arent working and I literally have about 9 tabs open and I cant seem to get it.
to a file, so why would you try redirect the output of a cat, mv, cp, touch, ... command?
Here seems to be a misunderstanding. To create a new file (the file doesn't have to exist for a redirection) and put the content of stdout into it all you need is the >-sign.
For example:
Code:
ls > test
will launch the command ls (which prints it output to stdout) and then redirect stdout to a file called test. This file is created if it doesn't exist, otherwise it will be overwritten. No cat, mv, touch, ... involved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.