General :: SSD Trim Simple Bash Script Program?

Jul 9, 2011

I wrote this script which works but it should run automatically about once per week. I hunted and experimented with KDE Task Scheduler (no dice and no help anywhere) and cron (confusing instructions and cannot edit crontab -e with vim, and cannot enter cron folders/files). I would settle for a desktop shortcut to run the script but found no for that.

Script:

Code:

#!/bin/bash
xterm -hold -e fstrim -v /
Machine:
OS: openSUSE 11.4 x86_64

[code].....

View 13 Replies


ADVERTISEMENT

Programming :: How To Compile / Simple Tutorial For Making Simple Program

Oct 7, 2010

i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?

View 3 Replies View Related

General :: Simple Bash Command Causing Bad Variable Name

Feb 18, 2010

When I run this command from shell, it runs ok
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
However when I save it into a file called test.sh (of course, I chmod it with +x), I got error "export: 2: bad variable name"

Here is the file:
#!/bin/bash
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
I am using ubuntu.

View 7 Replies View Related

General :: Create A Simple GUI For The Bash Script Files?

Feb 20, 2010

Are there any tools that can be used to create a simple GUI for the bash script files i have created, and the GUI should be able to run on both Solaris and Red Hat systems.

View 4 Replies View Related

General :: Unable To Execute Simple Bash Scripts ?

Dec 24, 2010

All of a sudden,i can't execute a simple script as follows:

exit 0

and:

exit

View 18 Replies View Related

General :: Make Simple Website In System Using Bash Scripting?

Apr 3, 2011

How to made a simple website in linux using bash scripting.

View 3 Replies View Related

General :: Write A Simple Program C++ To Connect To Mysql Database?

Sep 5, 2010

I'm trying to write a simple program c++ to connect to Mysql database based in my 127.0.0.1 server:

int main (void) {
cout << "33[2J" << "33[0;0f";
MYSQL mysql;
MYSQL *conn;

[code]....

View 2 Replies View Related

General :: Bash Variable - Simple Script For Finding And Copying Files Powered By The Command?

Aug 2, 2009

Ive been using linux for a while but I am just getting into shell scripting, im currently trying to get a simple script for finding and copying files powered by the command:

Code:

This works fine from the command line but when put in a script such as:

Code:

Code:

with the keyboard inputs for $fc1 and $fc2 being *.doc and ~/test respectivly. The only problem i can see is the xargs -ivar "var" part possibly needing $var to be defined?

View 2 Replies View Related

General :: Use Bash Shell When I Run A Program From It?

May 11, 2011

So I open firefox from my bash shell with:

Code:
firefox google.ca
it opens firefox, I can browse, etc.
Now if I alt-tab back into my shell, i can't enter any commands in the shell.

I know that i can do this if I close firefox, but I want to keep working in my shell with firefox still open.

Is this possible?

View 6 Replies View Related

Programming :: Simple If's In Bash Scripts?

Nov 7, 2010

I have been looking at: ut a lot of it is to do with files and numerical comparisonswhat would be the bash equivalent of:if (http isin $2) { do something }

View 2 Replies View Related

Programming :: Simple Subtraction Using Bash And Bc

Nov 4, 2009

I am trying to create a function that takes a pair of a high and a low limit, and returns an arbitrary number between them. Below is my attempt to create a function that accomplishes this by checking to see if they are equal, and if not, subtracts a very small number from the high limit and returns the result.

View 2 Replies View Related

Ubuntu :: Calculate An Average In A Simple Way With Bash?

Mar 3, 2010

does anyone know how to calculate an average in a simple way with bash? I've got something like this:

Code:
$ cat results.txt | head -10 | tr " " " " | cut -f13
0.23929285124
0.404716908011
0.35113102608

[Code]....

and now I want to calculate the average of the resulting numbers. I know I could write a bash or awk or perl script and use that, but isn't there a more simple, elegant way? There is for example "sum" in the coreutils, but no "avg"..

View 9 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Ubuntu :: Use The Date Command In A Simple Bash Script?

Oct 26, 2010

I am trying to use the date command in a simple bash script as below:

#!/bin/sh
this_date=`date`
echo "The date is $this_date"

This script seems to work only if a surround the command with the `` characters, which I copied from another script. Can anyone tell me why this is, and how I can insert these characters from my keyboard,which only has normal quote and double-quote characters?

View 5 Replies View Related

Programming :: Simple Bash Script Is Not Running All Of The Commands?

Jun 14, 2010

I am running a simple script that I copied from slug.ceca.utc.edu/docs/2009-3-26-linux-server-health.pdf and edited with the names and paths of my own servers. I don't know much about scripting (re: nothing) but I wanted to try and be efficient in my new role as a Linux Sys Admin. The script was saved to root's home directory and runs as part of root's crontab once a week. The script runs with no problem, but it doesn't actually seem to run all of the commands contained within. It skips some in the middle and the end and I don't know why. The script itself is this:

Code:
#!/in/bash
uname -a > /tmp/server.txt

[code]...

View 5 Replies View Related

Programming :: Simple Bash Script Not Returning Correct Value?

Sep 14, 2010

I have a very simple bash script:echo -n Create home directory?:

read HOMEDIR
if [ $homedir="y" ] || [ $homedir="yes" ]; then
homeval=" --makehomedir"

[code]...

View 6 Replies View Related

Ubuntu Multimedia :: Need Simple Microphone Program

Apr 17, 2010

I need a simple program that I can talk into a microphone and the sound will come out the speakers. I want to use my Computer that's hooked up to the store speakers as a PA System.

I am having a difficult time finding a program that will let me do this without having to record and playback. Any help would be wonderful.

View 6 Replies View Related

Ubuntu :: Simple-to-use Speech-to-text Program?

May 18, 2011

I've got a bunch of hand-written notes which I would like to put into Kabikaboo (great app by the way) - but it is a real pain reading stuff then typing it up. I'd like a speech-to-text app, so I can just read my notes out loud and the computer will turn them into text files.Looking through Synaptic, all I can find is Julius; and that does not seem to be an easy-to-use app at all. So many parameters to set, an impenetratable (to me) manpage; and although I am a CLI user quite often, some kind of GUI would be nice.

View 4 Replies View Related

Ubuntu :: Creating A Simple Gtk Program Through Terminal?

Jun 10, 2011

I am wanting to try creating a simple program through Terminal. Anything will do. A window or button, etc. I haven't found anything simple enough online yet, but I'm sure they're out there. I just want to expand my knowledge of gtk type stuff. Sorry if this is not the correct category to ask this. I was going to put this on the Community Cafe forum, but chose General Help instead. I am running Ubuntu Lucid. **Edit note: I did try the procedure described at the url (below), but I got all kinds of errors in terminal. [URL]

View 1 Replies View Related

Programming :: How To Write Simple C Program In RHEL5

Sep 17, 2010

How can i write a simple c program in my RHEL5?I am more concerned about what are toosl i need to install to get a C platfrom running in my RHEL5?

View 14 Replies View Related

Programming :: Simple Bash To Write Files By Year To A Log File

Jan 31, 2011

I have a folder of 2 many files that the old ls just hangs.

I am trying to write some log files such as;

I don't mind doing one at a time, but I am just playing and even getting the listing I am not getting the date stamp, I have the following;

That does create the file, but all the files look like this;

So basically it's just sticking that ls inside the log file and not actually running the ls, so how can I use the above type to get files just created per year?

View 2 Replies View Related

Ubuntu :: Creating Simple Program To Automatically Run Command

May 12, 2011

I need a program that automaticly runs this command in the terminal when I use it:
sudo modprobe nvidia_g210m_acpi
Sure, I know that it's not that hard to just write it in terminal and so on, but I really want a program for it. I'm using ubuntu 11.04 if U need to know that?

View 8 Replies View Related

Ubuntu :: Finding A Simple Program That Pops Up Reminders?

Jul 20, 2011

I am just looking for a simple program, nothing overly complex with crazy features. Just something that pops up above any browser/window and remains that way until you click it or something. The pop up would occur periodically or at sometime each day. It would say something like "TAKE A BREAK FROM COMPUTER" lol and other things. not suppose to be some full reminder program like a calendar.

View 2 Replies View Related

Applications :: Building A Simple Program With Putty Commands?

Jun 9, 2010

I'm interfacing with a device using putty and right now I have to use a reference document to dissect the data I'm sending and receiving. I'd like to build a program that can build packets according to user input and then dissect them upon receipt; basically an [ english <=> proprietary packet structure ] program that talks to the device via USB. The packets come in varying sizes, but are composed of well-defined fields and values.

View 6 Replies View Related

Programming :: Simple Download Scheduler Program Code?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

View 10 Replies View Related

Programming :: Call_usermodehelper - Loading A Simple C++ Program Like Hello World With Driver

Dec 13, 2010

all i want is loading a simple c++ program like hello world with this driver. everything works fine except it doesnt start the program. because ret returns with 0 i think the program works fine but I think i messed up something about how to start the c++ program. i used this example for my program but it doesent work too.

[URL]

is there anybody out there who can give me a hint what i messed up? i use ubuntu with 2.6.32 Kernel.

[Code]....

View 1 Replies View Related

Programming :: Write A Simple Character Printing Program Using NASM?

Jul 27, 2010

i tried a code to accept a character and print the same ! i can accept it with following code but its not working with printing that character i use NASM version 2.07

Code:

segment .data
msg1: db 'Enter a key',10
msg1len: equ $-msg1

[code]....

View 3 Replies View Related

Programming :: Errors - Make Pop-up Reminders For The Simple Calendar Program?

Feb 21, 2010

First off, I'm completely new to bash scripting so forgive me if I make any egregious errors. I'm trying to make pop-up reminders for the simple calendar program when. This is what I have so far:

Code:
#!/bin/bash
# set the time format for when
#current="$(date +%I:%M %p)"
current="$(date +%-l%p)"
today=~/.when/today

[Code]....

When I run the script, gxmessage pops up and displays the correct information, but it does so for each line in "~/.when/today" that contains a time that matches the current system time (which would be three pop-ups at 10PM, according to the example). I want it to display the information only once. How can this be accomplished? Is a while loop even the right job for this?

View 8 Replies View Related

General :: SSD Without TRIM Support Under Current State?

Mar 29, 2011

There are not SSDs with TRIM support available in my region that fit into my laptop (1.8", IDE, ZIF). I'm running Ubuntu 10.10.

Most articles (or questions on superuser) I've come across concering TRIM (or the lack thereof) date back to 2009, when not many SSDs with TRIM support were available and OS support was still very fresh.

I'm interested in the current situation, but I couldn't find too much information about it.

What are currently the "best practices" for using an SSD without TRIM under Linux?
I've read about the wiper script included with hdparm. Do I understand correctly that I could use this to free unused blocks, e.g. by running it once a month?
Some sources state that HFS+ (the default-filesystem of Mac OS X) doesn't suffer as badly from lack of TRIM as other filesystems. How about linux filesystems? Are there filesystems that are better suited for SSDs without TRIM than others?

View 1 Replies View Related

General :: Partitioning - Trim / Discard A Whole SSD Partition?

Jul 8, 2011

My partition /dev/sda3 on an SSD drive doesn't contain any filesystem, but it contains garbage. How do I do a TRIM/DISCARD operation on the whole partition?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved