I know this is somewhat lame, but I remember back in college the MOTD on some of the systems was a random quote. I always wanted to do that. It seemed really trivial, but still neat and clever.
I searched a bit and don't see anything built-in for CentOS, so I was considering writing a Perl script to parse the RSS feed from a quotes site, then update /etc/motd with a random quote from the feed. This would nearly guarantee I could have this on any distro with identical results. Does anyone know of anything that already exists? Is anyone interested in using a script that I write to have the MOTD updated with random quotes themselves, or am I the only one? I'm perfectly willing to share the result when I'm finished.
I'm looking for a way to dynamically modify a fied in the SQL file.
Example,
INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10023,SOMEDATA, SOMEDATA); INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10098,SOMEDATA, SOMEDATA);
[code]....
The third field in this SQL file is what needs to change to n+1
"10023" needs to change to "1" "10098" needs to change to "2" "10123" needs to change to "3" "10983" needs to change to "4" etc...
I tried with awk and sed, but since both require the usage of ' (single quote), my variable fails to get updated. I know i can use cut and recreate the sql statememnt, but i believe there should be easier way using sed or awk. Would anyone know of any creative way to get this to work in one-liner? This needs to be a part of the script preferable without making call to external file.
I am not sure what happened here. I have 10.04.1 and was able to run a command "update-motd". I wasn't able to get it to dynamically create a new motd. My hope was to have it recreate it once a day and email me the MOTD from the server.
In trying to get it to do this, I did a "apt-get install update-motd" in which it proceeded to do this, but then after the installation, I get:
"update-motd: command not found".
What did I do, how can I manually update/create the /var/run/motd file?
If I do setenv DISPLAY other_machine:0 and launch a gui application I can send this application to my other_machine Is there any mean (utility or whatever) to send an OPEN application to another machine (by its pid eventually) So if I have an nedit open, and its pid is 13245, I could do something like send_to_display pid=13245 machine=other_machine:0
Libraries have always been ambiguous to me. I would love to have a clear understanding of them. Here's what I know so far... Ok I know that libraries are a bunch of functions and definitions in C that binaries use. I also understand that static libraries are used by the binaries in /sbin:/usr/sbin:/usr/local/sbin and dynamically linked libraries are used by the binaries in /bin:/usr/bin:/usr/local/bin So why have statically linked and dynamically linked libraries? I know that dynamically linked libraries are used to save space. Otherwise each binary would need its own private copy of a library. So dynamically libraries are used to save space.
1. Where are the static libraries and the dynamically linked libraries located in the file structure?
2. Where does ldconfig fit into all of this?
3. Would a rootkit affect both statically and dynamically linked libraries? I would think yes unless the libraries only have read permissions.
4. If the above is true, is there any reason for your libraries to have write permission other than when you want to edit them?
Is it possible to change the GNOME desktop background during some period of time by just a random phrase from the list on black screen? Will is seriously load the CPU and consume battery life?
I have an archive directory that needs to be cleaned up once per quarter. The top level (/data/archive/*) directory names change daily, as well as the subdirectories and the filenames (the application names everything according to date). Also, there are two top level directories, bin and incoming, that we can't touch. I want to write a shell script that loops through the 15 or 20 top level directories and deletes all files and subdirectories older than 3 days (skipping the bin and incoming folders). Can someone get me started on a script? I am kinda new to shell scripting.
ive done countless google searches and forum searches with all the same results all the time. Is there anyone who can tell me what file to edit in order to display? Ive tried editing the /etc/motd file and no luck. I tried alot of other stuff too.
I applied some changed to the MOTD in /etc/update-motd (including removing the canonical mention in ./python2.6/dist-packages/landscape/sysinfo/landscapelink.py). After updating the system I found that all my changes had been deleted without any warning. Is there a way around this nonsense?
I want to automate my System-installation. So i try to make a Script that will generate the /etc/motd. Now i have the Problem that the script has some variables and after the "Hostname, OS, HW, IP" the "stars" are anyware, but not there they should. The most problem is the $OS this string can verry long or verry short be. Fedora release 12 (Constantine) or RedHat 5.4 i can do that after the variables place the "stars" on the write position?
I've just installed ubuntu 10.04 and the message text that shows when you ssh in shows the disk usage of /home.How do I get it to show the disk usage of the entire root / instead? (like it used to on some older version of ubuntu)
When i tried to log in, i get blank screen on the login page, even the src/configtest.php This can be solved by reverting whatever was edited for the motd option to its original paramater. anyone experienced this before and found a solution? The only reason for me to use php 5.2 is to install roundcube alongside squirrelmail. Using: centos 5.5 32-bit, squirrelmail 1.4.8, php 5.2
Does anyone know of any man pages that would provide me information on commands in shell scripting like while or case? I have a test tomorrow where we have to write shell scripts and we're allowed to use the man pages, but not allowed to look at previous scripts. I don't feel like memorizing a bunch of commands if I don't have to.
There is a scripting language made for Windows called AutoIt. It can do things like, for example, if a user highlights a word and presses a certain hotkey, it can copy that word into memory, open up firefox, go to google.com, paste the word into the text box, and click the button to search. What are some of the easiest scripting languages in Linux to learn that can do this?
I've been playing around with awesome wm, uzbl and doing quite a bit of reading and thinking. Do more programs need scripting support? I've found that being able to tell a program what I want it to do specificially has made life much easier. I'm finding some things (my prefered editors, ed and vim) are starting to seem a little limited since what they can do is fairly well defined and hard to change.
I am a bit confused with the first line while writing a shell script , if someone can please explain me the meaning of the first line " #!/bin/bash "the confusion for me is the # at the beginning , in shell scripting # means a comment. but in this case it loads the shell which the script must use,instead of commenting the line how is this possible. where is this defined , any particular file.
So for example, I uses VBscript to script out my tasks in Windows, and more recently PowerShell.From a Linux Admin's point of view, what scripting would he/she need to know? Would being proficient in Bash be sufficient or should you supplement that with something else? (if so, what is that something?)