General :: Check The Output Of Assembly File?
Jan 14, 2011
I have a small doubt regarding Assembly file compilation. I have two .s files. When I compile two .s files I am getting corresponding .o files. But when I compare the both .o files with diff command, it is resulting that two files are differing. How could/ what are commands we should use to understand the difference between two .o file's output.
View 4 Replies
ADVERTISEMENT
Mar 10, 2011
I have a bash script that i created for a colleague to configure the servers he installs. It does package installations, modifies some config files, creates directories.
The problem is sometimes he says that the script skips some steps. There are some steps that require user input and i think he chooses wrong option. (i have tested the script and it works fine).
My question is how can i save the output in a file (or log) so i can check if there are error? I know about the ">>" operators but will this "script.sh >> output.txt" still bring the dialogs for user input (like read input from shell and mysql password dialog from install package)? And how can i record everything he inputs?
I read about logger, but since there are a lot of commands do i have to log every command or can i just log the whole script.
View 3 Replies
View Related
Aug 21, 2010
I was following a simple tutorial on how to program and compile a hello world program using assembly when I got this error;Quote:ld: i386 architecture of input file `hello.o' is incompatible with i386:x86-64 output.The tutorial told me to make two files;Quote:hello.asmsection .data;section declaration
msg db "Hello, world!",0xa;our dear string
len equ $ - msg ;length of our dear string
section .text;section declaration
[code]....
View 3 Replies
View Related
Jul 30, 2010
How can I check and set who can view or open a given folder or file?
View 1 Replies
View Related
Dec 16, 2009
my partitioning layout was as follows
Vista Recovery
Windows 7
GRUB
Extended
-->Fedora 12 (ext4)
so, I shrunk my recovery in Windows 7 successfully, and booted into my Fedora 12 live cd to run Gparted, and move the partitions so that the free space could go towards fedora, I did such, and then I couldn't expand the partition to my dismay. Next, I woke up this morning, tried to boot to fedora to run SSH, grub loaded, but when I tried to boot fedora, I got the "File system check failed" error, and when I tried 7, it just went to a blank screen with a single "_" in the top left-hand corner.
View 7 Replies
View Related
Jul 24, 2010
I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:
3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---
[code]...
View 14 Replies
View Related
Feb 5, 2010
I am using below script to ftp a file to remote machine
Code:
#!/bin/bash
ftp -nv <<EOF
open ${SERVER}
[code]....
When I execute the above file its working fine and displaying output on to the screen. How can I log the output to a file?
View 7 Replies
View Related
Aug 3, 2010
having following problem in linux environment.I have a following basic file with name " BASEFILE", as shown example below :
sl.no pol.no name status loan
1 123 rama FORCE 500
2 234 jama LAPSE 800
[code]...
View 12 Replies
View Related
Feb 20, 2010
I have scenrio where i have to check first whether the files exists or not then count of records should not be equal to zero and file should be of current day not the previous day then only process my next task.There are three files totally.please let me know how to write script to achieve the same.
View 2 Replies
View Related
Nov 2, 2009
have a doubt, suppose in the script i include an exe type of file for ex. ./a.out, which takes input as a pdb file namely 1sn3.pdb, now i want my output text file to contain the name 1sn3.txt , how do i do that using the shell script
View 8 Replies
View Related
Oct 6, 2010
I've got a script to recursively create symlinks in my home directory to my settings directory, to keep the files under version control. I would like it to skip files which are already symlinked via a parent directory. That is, if I have these files/directories:
~/foo/ -> ~/settings/foo/
~/settings/foo/
~/settings/foo/bar
, how do I check that ~/foo/bar and ~/settings/foo/bar are the same file?
Edit: D'oh, another few minutes of searching revealed the answer: readlink -f $path
View 3 Replies
View Related
Oct 12, 2010
I am witing a file upload program in perl where i need to upload a wav or a gsm file and save it as a gsm file.How can i make sure that the uploaded file is a wav or a gsm sound file and not an executable malicious script or something.
View 2 Replies
View Related
Jan 18, 2010
I have a site that I login to to check updates. It does not have RSS because users need to authenticate themselves before getting access to the page. Is there a way to write a script that can login to the page and check whether the HTML has changed and then send me an email?
View 13 Replies
View Related
Dec 22, 2010
Occasionally Ubuntu runs a file check, and I assume repair if necessary, at start-up. what do I type into Terminal if I want to run a file check without waiting for the automatic file check to start? The reason I ask is that my system wouldn't boot last week and after several attempts to reboot, the automatic file check came into play and corrected whatever was wrong. This process of rebooting my system several times before Ubuntu fixed itself was very time consuming and frustrating. I dare say that there is a command line to trigger this file check.
View 3 Replies
View Related
Oct 28, 2010
I checked the smbclient man but could not find any switch to us in combination with 'get' to check if the file has been modified before download.
View 1 Replies
View Related
Mar 25, 2011
create one tar.gz file that contains my /home, /etc, /root directory.
a) The process ended with a 88GB file size (which is ok) but with the following message.Code: tar: Exiting with failure status due to previous errors.I have searched a little but I could not find what went wrong.
b) What are the limitations of tar and gz for backups. Of course I fully understand that they can not be used for differential backups (if it is called like that)
c) Let's say that my backup will be a file of 100GB and I want to see the contents of the .tar.gz. In kde there is a program called ark. Can ark handle so big files? Does it use my hard disk (eg. /tmp) to uncompress the file so to show me its contents? It might be the case that might be the compressed file is much bigger than the left space on the hard disk?
d) How can I do an integrity check when my tar.gz file is created?
View 11 Replies
View Related
Feb 2, 2010
I have a problem with saving output from awk to a file. The commands I tried:
Code:
$ top | awk '/Cpu|Mem/ {if ($1 ~ /Cpu/) {printf strftime("%H:%M:%S")" "; printf strtonum($3)" ";} if ($1 ~ /Mem/) {printf ($5/$3)*100; printf "
";}}' > file.out
and
Code:
$ top | awk '/Cpu|Mem/ {if ($1 ~ /Cpu/) {printf strftime("%H:%M:%S")" "; printf strtonum($3)" ";} if ($1 ~ /Mem/) {printf ($5/$3)*100; printf "
";}}' &> file.out
In both cases file.out is empty. What am I doing wrong?
View 2 Replies
View Related
Dec 16, 2010
I have a text file with a long list of RPM's. I need to check if each RPM is installed. I'm sure I can cat out this file and run "rpm -qa" against it, but I'm having trouble with the syntax right now...
View 5 Replies
View Related
Dec 10, 2010
I have been using linux for a bit of time but would still class myself as a noobie. I dont know excatly what I am looking for but I can best describe it in a sanario. I have started creating bash scripts which are looped indefinetly which checks afor files to process. my problem is, is there any way to check if the file is complete, as if the file is large and is being coppied from a different volume the file may still be copying or if the file is being uploaded by a user over samba/nfs, and if the file is still copying the process will most likely fail.
View 1 Replies
View Related
May 18, 2010
i have problem during boot my F11 , the problem is :
Code:
checking file systems
/dev/sda7 : superblock last time ( etc... )
/dev/sda7: Unexpected inconsistency ;run fsck manually (i.e,without -a or -p option)
***an error occured during the file system check
***dropping you to shell:
View 2 Replies
View Related
Aug 1, 2011
So I want to run command through ssh but also run a if check in bash to see ifa file exist. I know that to run ssh commands you do ssh user@server YOURCOMMANDbut if i need to run an if statements, how would this work??
View 4 Replies
View Related
Feb 26, 2010
How can I check to which file a given symbolic link points?
View 2 Replies
View Related
Apr 24, 2010
I'm installing and configuring my first server using RackSpace CloudServers running Ubuntu Karmic Koala (9.10) and I'm now installing iRedMail. The installation runs successfully until I recieve this error:
Code:
The following packages have unmet dependencies: mysql-server-5.0: Depends: mysql-server-core-5.0 (>= 5.1.30really5.0.83-0ubuntu3) but it is not going to be installed
E: Broken packages < ERROR > Installation failed, please check the terminal output. I understand this is telling me there is some software that iRedMail (or something iRedMail is dependant upon) that needs installed. Is this correct? And if so, what is i needing installed and how do I do that (aptitude install example-package?)?
View 4 Replies
View Related
Apr 29, 2010
I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?
View 4 Replies
View Related
Sep 19, 2011
This seems so simple when doing it from command line but I'm not able to accomplish it inside a script. I am trying to put output of following command into a text file:
CMD= mysql -uroot -psecret -e 'SHOW SLAVE STATUS G;'
FIL=~/replication-`date +%F`.txt
MAILTEXT=~/mailtext.txt
touch $FIL
$CMD > $FIL
Where FIL is a variable that contains path of the file to which to output command. I am running this command in a shell script from where I want to email contents of $FIL as attachment using mutt. But I am always getting 0 byte file. Also if I examine in directory the file is of 0 byte length.
View 3 Replies
View Related
Jul 27, 2010
I use 'grep -Ri "mypattern" .' to search for all files in the current directory recursively that contain "mypattern". But this command returns every single occurence, so that if a given file has several occurences of the pattern, the screen fills up pretty quick. More than likely, there's a way to restrict the output so that it only displays each file once, no matter how many occurences it contains, but I couldn't find how to do it.
View 2 Replies
View Related
Apr 25, 2011
I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,
Code:
echo "$a $b" > abc.csv
But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?
View 2 Replies
View Related
Apr 7, 2010
need to monitor pecific processes over a time frame in terms of the amount of memory and cpu usage it utilizes. I can do this using the top -p <pid> option and using ps to retrieve the pid's. However, seeing that the pid's might differ and it needs to be run on about 13 different machines, I would like to write a script for this that can be run at set intervals. My problem that I have is this:
- When running top -p <pid> I can specify a comma seperated list of the processes required to monitor at that specific time.
- I can use ps -ef | grep <process> | grep -v grep| awk '{ print $2 }' to retrive the list of pid's and output this to a file.
However, how can I output these to the file as a comma seperated list without having to manually do this every time? The reason for this is (an example), lets say I want to monitor the cpu and memory usage of postgresql as well as all its child processes, then I would ps grep for postgres and get the list of pid's for instance.This list then needs to be passed to top -p as a comma seperated list of pid's I suspect that awk or sed might have some options available for this but I do not know this well enough.
View 11 Replies
View Related
May 3, 2011
I have this code that is 'bashed' regularly with crontab and basically it will send me an E-Mail of most of the output but it misses out some of it!
Here is the crontab code to automatically run the script:
Code:
So that sends me an E-mail with most of the output of the following code:
Code:
It sends me everything up to echo "*******" "Begin compressing and transferring files" "*******" but it wont output the tar bit.. so it should give me a list of files that have been tarred.
View 1 Replies
View Related
Jan 29, 2010
I am currently using this command
Code:
apt-get install samba --force-yes -y > /sambainstall.txt This suppresses the screen output and sends it all to a text file, how do I have both?
View 2 Replies
View Related