Programming :: Query Of Commands That Made Executable With Chmod +x?
Aug 24, 2010
I have written a query of commands that I made executable with chmod +x, but this is an old version of what I'm writing. I'm in need of a way to determine the Operating System the user is using so that the script will run yum or apt-get on the right OS's.
I wanted to create an user but don't allow it to see the other user's home folder so I made chmod 0750 /home/folder and it worked fine so I went ahead and decided to completely forbid access to the root folder and I had the "great" idea to make chmod 0750 /, and now I'm having problems with wine and other applications, in example I used to have a folder in this address 209.239.114.51/mmgr but now it's giving me errors and if I try to run some applications I got error "There was an error creating the child process for this terminal"
i wanna use chmod() in linux x86 [debian 3.7.2 x86] but i have some problem in function argv
look at this function: Code: Select all int chmod(const char *path, mode_t mode);
and mode_t modes: Code: Select all    S_ISUID (04000) set-user-ID (set process effective user  ID  on              execve(2))
    S_ISGID (02000) set-group-ID (set process effective group ID on              execve(2); mandatory locking,  as  described  in              fcntl(2); take a new file's group from parent direcق              tory, as described in chown(2) and mkdir(2))
[code]...
i know there is some problem in ecx and mode_t value/
I'm trying lo lock a file (not using the chmod). This is the code I generated, but even locking the file I still can read and write the file from another process. (I'm working on a ubuntu 10.10, kernel 2.6.35-22-generic #35-Ubuntu SMP)
There is a protocol in use - for example when I use Firefox to do a query through Google - as I type into the search field the browser sends my characters - one at a time - to the server. As I recall, at one time I found the specification but I'm pulling a blank. As I recall it does a POST of each character as I enter it, and the server responds before I have entered a <CR>. I want to write a client side program that uses that protocol and need to see the spec.
I have created a database which stores students grades for different stages of a project. One of the stages of the project is the specification part. I have a simple bit of html code which is going to be used as the searching facility. I want the user to be able to enter their ID and then it will display only their results. At the moment, it is displaying the results for EVERY student because I cant seem to find the correct syntax for my statement.
What is the code snippet required to get an image to repeat vertically up a page? I can only find info relating to repeating *background* images in my search attempts, and this is just a regular image file which I want to repeat over the pre-existing page background. I'd like it to repeat all the way up the extreme left hand edge of the page. Say the image is called abd.jpg and is in the same folder as the index.html.
this is in fact my first attempt to try to work on a linux distribution and (dispite my problem) I'm still excited to work with it! I got the taste from messing around with my android phone, so I know a little bit of the syntax of the commands that are used, but it is realy basic.Now, my problem is my screen. I have two crt-screens ( inch and inch) which I can't manage to get working properly.
1. On a fresh install I had the problem that i couldn't get my refresh rate higher than 60 htz.I tryed installing different proposed drivers via the "system -drivers" (don't know if that is the right discription, I'm Dutch).The two proposed drivers didn't solve my problem.
2. I went to NVidia and download the Linux drivers for my graphical card (GeForce 8600 GT).I've gone trough a lot of trouble installing them: you can't install them when the Xserver is running, but commands like "init 1" or "gdm stop" made my system freeze (which is an other question: is this normal?). Eventualy I managed to install it by the "boot in safe mode"-option which I can choose when I boot my computer (I'm on a dual boot with windows 7).
3. Once the drivers installed it got worse. There was only one screen working and it worked only on a resolution of 640x480. It was just horifing. But with a lot of patient I managed to get one screen working at a resolution of 1024x768 and (again) not more then 60 htz, but the other screen was still stuck at 640x480. I kept playing around with it, edited my xorg.conf file manualy, broke it, restored it, etc etc. realy fun
4. This is the status ATM: both screens are working with twinview, both at a resolution of 640x480 (I can only select a lower one) and a refresh rate which I can't edit (stuck at "auto" and certainly way to low).I have an Nvidia driver which I don't like (it has made thing worse) but I can't unistall (I realy just don't know how to do that).I'm going to give my xorg.conf file at the end of this message.If this is a very typicly question, then I excuse myself. I realy have tryed to look for it, but couldn't find a thing. And if I found something, it was explained on a level of experitise much higher then mine.
# nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 270.41.06 (buildmeister@swio-display-x86-rhel47-07.nvidia.com) Mon Apr 18 15:15:00 PDT 2011
# nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 270.41.06 (buildmeister@swio-display-x86-rhel47-07.nvidia.com) Mon Apr 18 15:15:12 PDT 2011[code]....
Trying to export a Mysql query to a .csv file the query draws from multiple tables, e.g. sales, purchase and currency
Code:
What i'm trying to do is to export both the sales and purchase to a single line where both the currency for the sales and the purchase is specified.
Basically like this:
Code:
Problem here is that i'm stating currency.value twice in the same select and don't know how to define which currency.value applies to sales and which to purchase.
I need to make a daemon which listens to port 81 for messages like [URL] So far I made a daemon which serves as a simple stream server: I set up a socket to listen to a non-reserved port (like 9999), but I don't know how to read the query strings.
I'm having some trouble this morning to send a SQL query to our Oracle DB server in PHP. When I try to pass my value "OF/110246801A01" as variable it tell's me "Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number"
i am trying this query to compare records of two different tables...i m geting this message!! no required out putvalues for these ($jobTitle $industry $stationBase $gender $maritalStatus)are coming from textboxes!here is the code...
It is under PHP/MySQL $queryresult = $conn->query("INSERT INTO normalrequests VALUES($finalkey, 1234, 5678, FALSE)"); It is connected to the database successfully but I feel there is something wrong with the statement up there.
i will be quick, im trying to send a mysql query output into an array ie:
Code: declare -a HD HD=`echo "USE db; SELECT uid FROM user" | mysql -u $login -p$pwd -h $dbhost -B` echo ${#HD} those vars in mysql connection are previously and correctly assigned. but got an error
I am querying a single string column in a table. The string values have spaces in them. I want to loop over each value in bash. I set IFS to split lists on newlines instead of spaces. When I try this, it is splitting the list of results on the actual character 'n', not the newline ''.
DATA=`mysql -u root -ppassword --silent 'SELECT name FROM table_a;'` IFS=$' ' for i in $DATA; do echo "item = $i"
how do I achieve the result but here is the story. I have a script which prompts for the IP Address and read that value and validate if reachable. If not then it should keep on prompting until the IP is reachable. I tried using until loop as well as while loop but dang..Here are the codes
If I have a Query that returns columns where some of the values are NULL, is it possible to tell SQL to return all the NULL values as empty strings instead of the NULL datatype?
If the solution is vendor specific I am (unfortunately) using a Microsoft 2008 SQL server.
Example:
Code: Select * from imaginary_table where id = 1 Might return: Code: Id: 1 Name:xyz
On ubuntu i just compiled my first program using lazarus and i can open it in terminal fine but if i double click the file simply marked 'hello' nothing happens.
I am not sure if this is possible. I have IP's stored in a mysql database. When I query the database, it returns the IP. I would like to replace the IP with something else prior to displaying the results. Is it possible even though I have not stored it in the database?
I have the following in a while loop (mysql_fetch_array).
Code: <td align="left">' . $row[IP] . '</td>
Instead of displaying $row[IP] from the database, I would like it to display something else which I define in the PHP code but based on the IP.
So I've got a rather vast database, one of the columns is date in the following format: DD/MM/YY HH:MM:SS. This is starting to cause problems with a php page I'm writing which asks the user for a 'start date'. Would it be better for me to split the date column into date and say time? Or is there a way of using distinct and masking the times.
I have an access database and I would like to build a website on the slackware 12.2 server running apache 2.11.14 to let users query data from the MS Access database. I am thinking that I could just do it in jscript and make a jdbc connection and that should be good. What do you guys think.
I want to find the cpu time taken by an executable to run.. the executable is writting the output to a file. i want to write the time takem by cpu to the same output file.
like:
abc is my executable which is taking input as input file and writing the result in output file.. i want to append cpu time information in the same file. can i do it with time command?
I have made two source files named as sum.c and average.cI have included sum.c in average.c both files in Documents directory.when i compile average.ot followingerror"average.c:4:22: fatal error: sum.c: No such file or directorycompilation terminated.How to solve this issue?I have tried to copy sum.c to usrinclude folder but unable to copy
I have written C++ programs on Windows. I am now learning Linux to ensure my software is portable. I can compile and run C++ programs from the bash shell, but I cannot run my executable programs from the GUI.Here is my sample program:
I'm maintaining a c++ application running on a 64-bit RHEL5 server w/32GB ram, but compiled to be a 32-bit executable with g++. The application handles large amounts of data, and has lately been throwing a st9bad_alloc exception. "top" shows the application as dieing right around when VIRT=~3GB, SWAP=~1.5GB and RES=~1.5GB. In the core dump I can see that it's consistently failing to push_back() a piece of data onto a std::vector (which already has hundreds of thousands of objects in it).
I know 4GB is the maximum address space for 32-bit applications. I've learned from this lwn article that a 32-bit kernel reserves 1GB of address space, leaving 3GB for user space. However I'm not running a 32-bit kernel, so that really doesn't answer anything.I wrote a dummy app which called malloc() over and over in a for loop, and it is able to allocate right up to the 4GB before it fails. I don't understand why this one seems to be able to allocate more.
The only difference between the two apps (besides malloc vs std::vector:ush_back), is that the 3GB crashing application attaches to 512mb of shared memory.Anyone have any ideas why this application would be crashing at 3GB? Is there any more diagnostics I should be doing? I would ultimately like to port this to 64-bit for a number of reasons, but it is a big undertaking for my organization, and I'd like to better understand what's going on here.
i have only basic knowledge of C so guys plz help me...is C language support call the C executable inside the C ?example contect mainA.c have a many function define in the struct,when i compile mainA and make a executable the name is ( A ),can i use executable C inside the C <my C program call the executable ( A ) > .