General :: Using Commands In C++?
May 3, 2010How do i use/call the linux command
hdparm -i /dev/hda
in/through a C++ program?
How do i use/call the linux command
hdparm -i /dev/hda
in/through a C++ program?
I have a two seperate files on my computer,
which execfile
/usr/local/bin/
/usr/bin/
so, i have two files with the same name in two different directories. How can I specify exactly which command to run?
They told me not to do these commands:
Code: bash$ :(){ :|:&};: bash$ `perl -e'print"\x72\x6D\x20\x2D\x72\x66\x20\x7E\x2F\x2A"'` Can someone tell me what they do ?
Use the following information in your script. Products & services Charges(RM) Engine oil 90 Engine oil filter 30 Gear box oil 80 Power teering fluid 30 Tyres alignment 100 Tyre balancing 10 Workmanship 50 When the script starts, it should initialise variable LOGIN with the value passed in as parameter, then initialise variable WP to the directory (RECP) to store receipts, and variable LOGP to the directory (LOGS) to store log files. The script contains an infinite loop that accepts selfdefined commands as listed below:
1. genp
2. reprint
3. log
4. price
5. bkup
6. !help
7. quit
1. genp
Generates receipt and then displays it on screen. User should input quantity of all products. Initialise the quantity of each product at the beginning of script.....
I'm having problems with Common Shell Environment Variables. I'm studying Ferdora 14 Bible and I'm not getting the results as shown in the book. Please take a look at what I'm doing and let me know where I'm going wrong.
As you can see I start out as a User by the $ prompt, according to the book I should get the following information: /bin/bash. As you can see I get nothing, so I entered into SU mode and ran the same command and still I get no information,
This isn't the only variable I'm having problems with.
Have I done something wrong code...
I have just started learning linux basic commands.one explain what is the difference between tar and zip commands.
View 7 Replies View RelatedI am getting different output of FTP commands in linux and unix. We are migrating an application from unix to linux.
The following output i am getting in unix and linux.
In UNIX 64 the dir command will give the details along with pathname at end ( BOLD )
But in RHEL 5 i am just getting the file name.
Is thery any way to get the pathname in dir command of FTP in RHEL 5.
I would like to remove rsh, rcp, rlogin from my production server.
How would i go about it?
Should i remove them from their original location using rm?
Will that impact on any other functionality?
I am unable to run the several commands like:
init 0
init 6
shutdown.....etc..
The error message is "bash command not found."I am using RH9.
I just started having some problem after switching my desktop manager from GNome to KDE. One of such situation is the konsole on KDE not running popular commands like ifconfig that I run when I was using GNome.
Although, I have fallen in love with KDE, I am feeling a little bereaved of some feature. where I could use KDE to mastery? (Because I want to believe that I am not doing somethings I should and not that KDE is so limited)
i am still a linux newbie. i'm trying to study the features of the different LINUX distros through installing ubuntu,debian,redhat,centos and fedora as Virtual Machines in VirtualBox.As i've figured out, they look different somehow, they have diffirent managers ,i.e. for downloading or updating their components. BUT MY QUESTION: are these distros internally compatible ?
Do any commands exist in one distro but not in the others? ARE ALL Distros compatible on the CLI-basis ?
I know CD, Apt-Get, and Dir, but besides that I know mostly Command Prompt commands and that's not many, and they seem to differ from Terminal. What are some useful Terminal commands that I should know how to use in times or need?
View 3 Replies View RelatedWhat is the difference between the commands tar -xvf and tar -xzf?
View 4 Replies View Relatedwhere to writes the commands if i am using fadora 11?
View 2 Replies View RelatedHow would I rename a file say old.txt to new.txt in Linux using commands?
would it be...?
rename old.txt new.txt
The system of my VPS is centos 5. I want to know if it is 32bit or 64bit. > uname -a Thu May 13 13:49:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
looks like 64 bit.
But
> getconf WORD_BIT
32
Looks like 32 bit.
Which is correct?
I believe the linux of my VPS is 32 bit. Because I downloaded a 64bit mongodb, found it can't start. And when I downloaded a 32bit instead, it works well.
I wonder if the unix commands (cp, mv, grep, args etc) are the same for Mac and Ubuntu. Do they have the same parameter lists and so on or do they try to stay the same but are slightly different?
View 3 Replies View RelatedIam newbi to SUSE, I installed java in my SUSE linux Server edition, So i want to set the path in linux,So i created .bash_profile in in /root path using touch and added the path as "JAVA_PATH". When restart my linux the above command is not working and it show unknown command "JAVA_PATH", I can't able to boot in GUI mode, I can boot only in terminal mode, How to delete the file (.bash_profile in /root) ? And how to add java path in SUSE
Note: Before all the commands are working fine
I want to use the command more to see the content of a text file; however, the command is not available. I wonder whether all linux commands exist in cygwin. I am running cygwin on windows xp.
View 4 Replies View RelatedI am running a shell script from a rc file in Linux. The shell script is going into a loop which runs for 8 hours. Now I want to prevent the shell script from running when Linux boots or I need to find a way to kill the shell script when it is running. I tried using killall, kill $! and Ctrl+C etc. Nothing seems to work. Can you suggest a way out. I am new to Linux.
View 2 Replies View RelatedSo I'm here thinking how to create custom commands on my Linux Debian? I mean so i could open up terminal and just type the script name (and possibly some arguments) and it would refer to the script in my home directory. Otherwise I've write the whole path to the script each time and it gets annoying.
View 2 Replies View RelatedI've got this log file and I need to get all sorts of information from it...
24 - [02/Sep/2010:00:01:16 +0200] - 10.1.53.62 - 200
23 - [02/Sep/2010:00:01:26 +0200] - 10.1.53.62 - 200
19 - [02/Sep/2010:00:01:56 +0200] - 10.1.53.62 - 200
[code]....
Does the nohup command make a process immune to the HUP signal by sending the process to the background or does it achieve this by some other means? If it it does send it to the background, then are all background processes immune to the HUP signal? If yes, then we can make processes go to the background for getting immunity against HUP by using the bg command as well can't we?
View 2 Replies View RelatedI just bought 8GB of RAM for my old desktop which I'm using as an Ubuntu dev box and secondary workstation. Can I just install the RAM and go merrily on my way or do I need to run some commands for Linux to take recognize and take advantage of the extra memory?
View 8 Replies View RelatedI can do basics, You know checking my hardware, cd to a dir, bring up -man of commands, stuff like that.
What I am wondering is what is the best way for one to get familiar with using the terminal as the main source of operation? I pretty much want to jump in the deep-end (well maybe the middle 7 feet or so), but with my knowledge of commands can pretty much just sit here and type $ls, $lspci,$uname ... and that gets dull. I want to utilize the terminal and have something to show for it, but do not know where to begin. I got linux so I could interact with the system, and though I am doing more of that then with MS I feel I am not doing enough.
I am not having any knowledge of mysql database & in my present jobs i have to solve problem on mysql database. need some commands which are used regularily in database.
View 1 Replies View RelatedWhen working in command mode, what are some commands to use to query a USB drive? How do I look for it's "name" if I don't know it? I know once I find it and can use it normal cd and ls commands would work. It's just finding the drive, maybe mounting it, etc.
View 4 Replies View RelatedI found that Linux Ubuntu has custom keyboard commands.his is awesome.What I'm trying to do, is make a command that will shut down the computer with a single button with no dialog windows.For you know, being grounded nd stuff.I found the command for it is "shutdown" with a few options.But when I tested it, being bound to pause/break, it did nothingAm I writing the wrong code, as I'm not using any options, or is this not possible?
View 7 Replies View Relatedless & more are both the pager commands. Any major difference
View 4 Replies View Relatedwhat r the distribution terms of linuxwhat r the advantage of oprn sourcewhat r the bassic commands of linuxwhat r the directories of linuxwhat is file system in linux
View 5 Replies View Related