Programming :: Get Script To Confirm The Directory It Is In?

Mar 22, 2011

I know this does'nt work but how in my script would I get the script to confirm it's directory is in.

if [ $pwd -eq $LOG_DIR ];
then
echo "work"

[code]...

View 4 Replies


ADVERTISEMENT

Programming :: Could Someone Confirm My Understanding Of Linux Drivers?

Jun 20, 2011

2 Questions:

1) Is there a dedicated forum on the net for people writing Linux drivers?

2) I've been reading over how Linux drivers are put together and even made my own dummy driver. However, before I begin writing the "real" driver I set out to write, I would like someone with some driver writing experience to verify that my knowledge is correct.

The driver I intend to write is for a PCI card. The very first thing I need is to know is the vendor ID and device ID of the card. After having that information, I can then use the pci_register_driver command to open a connection to the card. At this point, I need to use the pci_*_config_* commands (an example of a pci_*_config_* command is pci_read_config_byte) to figure out where the device is mapped in memory and what I/O ports I need. Now, the pci_* breed of commands take a parameter integer (which is an address) as there second argument. The address(es) which I will use and what they accomplish is device dependent. At this point, after having otained the I/O ports I need, I can then begin writing to them via the inb, outb, etc commands. Writing to X port will have Y result but this is vendor specific.

View 2 Replies View Related

Programming :: Copy Files After Search In Array From This Directory To Another Directory?

Jan 3, 2009

After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).

View 4 Replies View Related

OpenSUSE Install :: Confirm 32 Vs 64 Bit CD / DVD?

Mar 27, 2010

1. I ordered an Opensuse 11.2 Live CD-Gnome 32-bit and an Install DVD 64-bit from a [URL].

2. My plan is to install Opensuse 11.2 from the Live CD on an old 32-bit Dell Inspiron 7500 laptop (512 mb Ram) and dual boot it w/ Windows XP.

3. And then to install the 64-bit Opensuse 11.2 on a newer 64-bit Acer Ax1200 desktop (4 gig ram).

4. Is there a way to confirm that I have the correct 32-bit Live CD and a 64-bit Install DVD?

5. I tried looking at the "properties" of the Opensuse Install DVD while in XP, w/out seeing any obvious signal identifying 32 vs 64 bit.

6. I have a hunch that if I accidentally try to install the 64-bit version on my old 32-bit laptop, it would be a disaster.

View 1 Replies View Related

Ubuntu :: How To Confirm 10.10 32 Or 64 Bit Version

May 16, 2011

I'm running 10.10 on a Pentium laptop that also has Win7 64bit installed. I did some googling on this and then ran uname -a in a terminal.
advait@advait-laptop:~$ uname -a
Linux advait-laptop 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux
Based on what I saw in my google search, it means I'm using Ubuntu 32 bit. I want to make sure I download the correct version of Google Earth.

View 7 Replies View Related

Server :: Backup Confirm Via Tar Possible?

Dec 22, 2010

Ran into an issue where there was a corrupt tar and nothing to do except revert to an even older one. Naturally I am then asked, can you confirm via crc or something that a tar was successful?I wish to tar / gzip some files and folders, will do them seperate, some are small, others can reach 5-7GB, but is there any way to rify aside from listing the contents that upon a tar completion that everything was fine?

View 2 Replies View Related

Ubuntu :: Confirm That Trim Is Working In MM?

Oct 13, 2010

For anyone who is not familiar with it, I am talking about the trim functionality in the 2.6.33 kernel for solid state drives.

View 6 Replies View Related

OpenSUSE :: Eclipse Confirm Buttons Not Working In 11.2?

Nov 23, 2009

yesterday installed a fresh OpenSuse 11.2. Since then the confirm buttons (OK / YES / ...) are not working, when clicking (mouse). An keyboard ENTER-press does work.

What is the problem? Is it an OpenSuse bug?

View 9 Replies View Related

OpenSUSE Install :: Would Like To Confirm That Problem Is -- In Fact -- A Bug?

Sep 4, 2010

So here's the deal: I'm "supporting" this older lady who's using an i386-type Compaq (Pentium III -- Coppermine) with 384MB of RAM. She says that the machine is being slow, and I decide that she needs a leaner OS than what she has (which is Ubuntu 09.10). OK, so I do some research and conclude that openSUSE is the best OS for both the machine and for the older lady. I use Bittorrent to download 11.3 and check the md5 checksum. In my own room I install on a machine that is identical to hers 11.3 and everything checks out (I ultimately conclude that GNOME is large for the machine and spend a number of days trying to swap it out with XFCE, but that's another story.). So I figure that everything's great and I use the same (GNOME) live disk to install 11.3 on her machine. As soon as GNOME fully boots up it crashes. I reinstall and it crashes again. I swap out hard drives (remember, these are identical machines that I'm "supporting", here) and as soon as GNOME is fully loaded 11.3 then promptly crashes. Finally, I swap out her entire MACHINE with the identical one that I've been working on in my room. The f---er crashes when GNOME is fully loaded! By now, I'm fully pissed (because by this time my regular machine has ALSO gone down (possibly because of openSUSE, but I cannot say definitively so at this time).

[Code]...

View 9 Replies View Related

General :: How To Confirm Source Was Correctly Installed

Jul 6, 2011

I've installed CFEngine from source (for those of you who aren't familiar with the product, check out the wiki page) on an AIX server. I had some issues setting it up but finally got it to gmake successfully.

Once I run gmake install I get a very short output (based on other source builds) and no errors. I figure something is fishy and I now I need to figure out a good way to find if it was correctly installed. I tried:

find / -name cfeng* 2> /dev/null

Is there something analogous to rpm -qa | grep cfengine?

Here is a copy of my output in case anyone needs: [url]

View 1 Replies View Related

Ubuntu Security :: SSL Without Users Having To Confirm Certification?

Jun 11, 2011

I am looking for the best method to implement SSL for my sites but without users having to accept the CERT and I'm small so I'd want to use the cheapest method like signing my own certs. Is there an automatic way of doing it or best practice?

View 8 Replies View Related

Ubuntu :: Apt-get Command Without Needing User To Type Y To Confirm?

Jan 7, 2010

I am writing an installation script that installs several packages using apt-get. Is there a way to run that command with some sort of option that makes it so the user doesn't have to type Y to confirm the installation? The user needs to be run the script as sudo

View 2 Replies View Related

Debian :: Bluetooth Doesn't Pair, No Agent Available For User Confirm?

Jun 15, 2010

I'm using debian lenny (5.0.4) on 3 different laptops, two fresh installs and one was installed with etch and then updated.In the one that has been updated pairing works without any problem, while in both the others it doesn't work. I can see this on syslog when I try pairing from the phone:Jun 15 10:31:02 robertof-lt hcid[17891]: io_capa_response sba=00:22:5F:00:C2:1F, dba=C0:38:F9:D3:29:A3)Jun 15 10:31:02 robertof-lt hcid[17891]: io_capa_request (sba=00:22:5F:00:C2:1F, dba=C0:38:F9:D3:29:A3)Jun 15 10:31:04 robertof-lt hcid[17891]: No agent available for user confirm request

View 1 Replies View Related

General :: Confirm That Two Filesystems Are Identical Ignoring Special Files

Jun 15, 2011

/media/A and /media/B should be identical, but I want to confirm before deleting one.

Duplicate file finders don't work, because they'll find two copies of the same file within B, for instance. I only want to confirm that every file in one is identical to the other.

diff -qr /media/A/ /media/B/ seems to work, but the output is cluttered with garbage like

diff: /media/A//etc/alternatives/ControlPanel: No such file or directory

and

File /media/A//dev/tty8 is a character special file while file /media/B//dev/tty8 is a character special file

I can suppress the former with 2> /dev/null, but I don't know about the latter.

rsync -avn /media/A/ /media/B/ also produces a bunch of clutter, like "skipping non-regular file".

How can I compare the two trees and just make sure that all the real files exist in both and are identical?

View 2 Replies View Related

Programming :: OpenCV Programming - Highgui.h: No Such File Or Directory?

Jul 1, 2010

I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all

View 3 Replies View Related

Programming :: Deleted Files In Directory With So Many Files Without Deleting Directory Itself

Nov 14, 2010

There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.

View 3 Replies View Related

CentOS 5 :: The "rm" Command Does Not Prompt To Confirm?

May 10, 2009

When logged as a normal user, the "rm" command does not prompt to confirm.

Is this the default behavior?

View 2 Replies View Related

Programming :: Get The Contents Of A Directory In C++?

Dec 27, 2010

How to get the contents of a directory in C++?I know about opendir(), but I wonder if there is a C++ way (that uses classes and exceptions).

View 1 Replies View Related

Programming :: Compare Directory To .txt Or .xml ?

Dec 14, 2010

I have a database of around 4000 files. I use rsync script to transfer from 2 separate updated hdd every month but I need a way to compare a .txt file or .xml file to the updated drive as I cannot use rsync delete because I can not mount all 3 drives at the same time?

View 9 Replies View Related

Programming :: Get The Directories Of A Directory?

Apr 4, 2011

I need to walk in folder recursively in C. To change the directory, I can use chdir, but how I can get the directories of a directory?

View 3 Replies View Related

Debian Programming :: No Such File Or Directory

Sep 18, 2015

I’m new to C programming so I wrote the following program to see if everything I needed to write programs with GCC and the standard C library was already installed. I am having issues in OS 10.10.5, where I am unable to build and compile some simple code, either using Xcode or Sublime text. I decided to install Linux Mint in Virtual Box to see if it would work.

Code: Select all#include <stdio.h>
void main()
{
 printf("Hello! This is my first C program with Linux Mint
");
}

For some reason, I'm getting the following error:

mint@mint-VirtualBox ~/Desktop $ gcc hello.c -o hello1
hello.c:2:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>

[code]...

View 8 Replies View Related

Programming :: Error: Gtk/gtk.h: No Such File Or Directory

Feb 13, 2011

gcc kk.c : kk.c:1: fatal error: gtk/gtk.h: No such file or directory compilation terminated.

View 1 Replies View Related

Programming :: Adding Directory To The Path?

Apr 2, 2009

I have made the installation of Qt4 in my Fedora/MacBookPro. It also got a first compiling and running a simple program. The point is that for the compiler to run I need to point out every time where the bin is located, as that:

$ /home/threader/kinetic/bin/qmake -project

I have tried the following, but it still doesn't work:

# script
#-----------------------------------------------------------#
# /etc/bashrc or /home/threader/.bash_profile
# config to Qt compiler

[code]....

View 5 Replies View Related

Programming :: Check Available Space On A Directory With C++?

Sep 23, 2010

i'm using c++ and Ubuntu and I need to write/copy some files to a directory chosen by the user of my system (the user can save it on any folder of any disk of the pc or other usb device). Before I do it, I need to know if there's space available on the disk. I cannot only check the result of write() function, the validation must be executed before I start to save or copy.

I was trying to use statvsf structure, but I only have the complete filepath (/home/lobinho/myDocs/), not the disk path. The statvfs() function only works with disk path (i.e. /media/KINGSTON ).

The source of my function:

Code:
int MyClass::availableSpace(string dst, ulong* availableSize) {
int result = ERROR;
try {
struct statvfs devData;

[Code]...

View 4 Replies View Related

Programming :: Data Directory In Automake ?

May 9, 2010

I have some data files that should be distributed with my program. Using dist_pkgdata_DATA in Makefile.am, I get these files installed to /usr/local/data/share/package-name. The problem is that data is read-only, and my program needs to modify it. Playing with dist_sharedstate_DATA, dist_localstate_DATA, dist-data_DATA varibles, I got different installation directories, like /usr/local/com, usr/local/var, but data is always read-only.

How can I distribute modifiable data files with my package? I need some common directory for all users, or maybe local data in a user directory.

View 3 Replies View Related

Programming :: File/directory Operations In C?

May 5, 2010

How do you do things like list directory contents, mov/copy files, make directoriestc. in C?

View 1 Replies View Related

Programming :: G++ --> Iostream.h: No Such File Or Directory?

Apr 8, 2011

I recently switched to ubuntu, so kinda new to it. I installed g++ by

Code:
sudo apt-get install build-essential
and now when i'm trying to compile this:

[code]....

View 14 Replies View Related

Programming :: Remove All Files From A Directory Which Are 24 Hr Old?

Apr 8, 2010

I was preparing a script which will remove all my files from directory which are 24 hour old.I tried some thing like thisfind . ( -name 'log.*' -mtime +1 ) -exec rm {}; but it is throughing error like : missing argument to exec.

View 8 Replies View Related

Programming :: Copying A Directory In Ant Buildfile?

Sep 13, 2010

I'm having trouble copying a directory from one place to another in my build.xml file. I need to copy an image directory from the base directory (or root directory) to the dist directory so that it can be included in the jar file when I'm done compiling my java files.

This is my base directory:

drwx------ 1 enrique enrique 4096 2010-09-13 21:19 build/
-rwxrwxrwx 1 enrique enrique 1861 2010-09-13 22:17 build.xml*
drwx------ 1 enrique enrique 264 2010-09-13 21:19 dist/
drwx------ 1 enrique enrique 8192 2010-09-11 19:30 img/
drwx------ 1 enrique enrique 4096 2010-09-13 21:18 src/

The build/ and dist/ directories are created when I compile my java files from the src/ directory and img/ is where i have all my .png files which are needed for the program to display correctly.

Now for my Ant file: build.xml:

<?xml version="1.0"?>
<project name="PokerFiles4" default="compile" basedir=".">
<!-- Setting properties -->
<property name="dir.src" value="src"/>

[code]....

how I can get my img/ directory in the jar file would be appreciated, I'm writing a poker application to generate statistics for poker hands post-flop, and on the turn, like pot odds, hand odds, poker odds, outs, etc, I got the gui working, all I have to do is get the buttons in the app working, but all my classes are written and are working fine.

View 3 Replies View Related

Programming :: Does't Create Directory But Return As Value '0'?

Feb 23, 2010

$val = mkdir $directory, 755
print $val;
does't create directory but return as value '0'

[code]....

View 2 Replies View Related







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