General :: Find The End Tag In Xml File?
Nov 30, 2010I wanted to know how to find the end tag in shell where I have multiple tags in xml like
<tag name="x" version="1.0">
</tag>
<tag name="x" version="1.0">
[code]...
I wanted to know how to find the end tag in shell where I have multiple tags in xml like
<tag name="x" version="1.0">
</tag>
<tag name="x" version="1.0">
[code]...
am new to linux and trying to find a file in sub directories using find command as:find .-name *.jpg -type fBut I am unable to get the result as find command is not permitted by the server administrator.Is there any way to find files without using find command.
View 14 Replies View RelatedMany folders within a subdirectory some of which have lots of data in and some of which have only one specific file called produkt.fil inside.I need a command to find and delete those folders that contain ONLY the file produkt.fil - if other files exist (doesnt matter what they are) then they should be left alone. Note: produkt.fil exists in all of the folders always.
View 5 Replies View Relatedi'm just curious if i can search for the dir/file pattern in the single "find" command?
here is an example:
dir1/dir2/dir3/file.txt
dirXX/dirYY/dir2/dir3/file.txt
dir1/dir4/dir3/file.txt
i want to search for the pattern "dir2/dir3/file.txt"
How to find EOF char in file
View 1 Replies View Relatedin directory so many files are there. if we want to find some text in all the files, what is command is to be used.
View 6 Replies View RelatedI have just downloaded, configure'd, make'd and make install'ed the Google Log Library to my computer. It built all required files (as far as I can see) and copied the .so file (libglog.so.0.0.0) to /usr/local/lib. Then it created two symbolic links called "libglog.so.0" and "libglog.so" that point to that shared object file:
lrwxrwxrwx 1 16 /usr/local/lib/libglog.so -> libglog.so.0.0.0
lrwxrwxrwx 1 16 /usr/local/lib/libglog.so.0 -> libglog.so.0.0.0
-rwxr-xr-x 1 498381 /usr/local/lib/libglog.so.0.0.0
Now I'm trying to execute a program that uses the library, but when I start it, I get the error message that it can't open the so-file:
cloud:/home/blam/redirector/redirector2# ./redirector ./redirector: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
/usr/local/lib is included in my /etc/ld.so.conf file, and another library that's located in this directory is loaded correctly.
How to find file by content on linux by command. Example: i want find file contain word "helo" on my computer (OS: LINUX)
View 4 Replies View RelatedI am trying to find and delete a file using this Code: find . -type f -name ph2964781400100954291.jpg -exec rm -f {} ; It does not work, I think because by default on my distro rm is iterative.
View 2 Replies View RelatedCan we find the inode of a particular file using its inode number?
The reason is i want to know how many blocks are occupied by specific file.
if we consider block size of 1K.
if the file size is of 100 bytes. In such a case, when the file is
stored on disk, the file will occupy 100 bytes or 1K (since we have
choosen block size to be 1K) ?
send me the code to find the md5 checksum of a file in c++.
View 7 Replies View Relatedi want to write a program that need to know how much data has transmitted in network usage _how much send and how much received_which file , record or structure in which library i have to follow ?
View 2 Replies View RelatedIs there any way to know which process had created any file in Linux Red Hat/CentOS 5?
View 2 Replies View RelatedI'm using bash under Ubuntu.Currently this works well for the current directory:catdoc *.doc | grep "specificword" But I have lots of subdirectories with .doc files.How can I search for, let's say, "specificword" recursively?
View 2 Replies View RelatedI want to search file excluding the NFS ...find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions alsoIs there any way to exclude the NFS only.
View 2 Replies View RelatedI've combed the prior posts for an answer but cannot seem to find one that fits.I have a half dozen imation super disks, 120 mb. I would really like to use them occasionally.I can't seem to format them to ext because of a permission issue. But I somehow think it is not a user permission problem but a disk issue.I have already done:
Code:
chown root:floppy /dev/fd0 && chmod 660 /dev/fd0 && adduser <username> floppy
checked to see that I was properly added as an user but when I tried:
[code]....
the below tag is in the xml file. Now i want to find and extract the value of application name test1 and test2 one by one in the unix shell script. how to do this
<application name="test1">
</application>
<application name="test2">
[code]...
I have an SQL dump, file.sql that has many references to a particular domain, d1.com. I would like to run a command that can replace every occurrence of d1.com with d2.com. I've tried looking into sed before but the man pages are quite daunting.
View 14 Replies View RelatedI have the following command that I run on cygwin:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | xargs du --max-depth=0 > foldersizesreport.csv
I intended to do the following with this command: for each folder under /d/tmp/ that was modified in last 150 days, check its total size including files within it and report it to file foldersizesreport.csv however that is now not good enough for me, as it turns out inside each
/d/tmp/subfolder1/somefile.properties
/d/tmp/subfolder2/somefile.properties
/d/tmp/subfolder3/somefile.properties
/d/tmp/subfolder4/somefile.properties
so as you see inside each subfolderX there is a file named somefile.properties inside it there is a property SOMEPROPKEY=3808612800100 (among other properties) this is the time in millisecond, i need to change the command so that instead of -mtime -150 it will include in the whole calculation only subfolderX that has a file inside them somefile.properties where the SOMEPROPKEY=3808612800100 is the time in millisecond in future, if the value SOMEPROPKEY=23948948 is in past then dont at all include the folderin the foldersizesreport.csv because its not relevant to me.so the result report should be looking like:
/d/tmp/,subfolder1,<itssizein KB>
/d/tmp/,subfolder2,<itssizein KB>
and if subfolder3 had a SOMEPROPKEY=34243234 (time in ms in past) then it would not be in that csv file.so basically I'm looking for:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | <only subfolders that have in them property in file SOMEPROPKEY=28374874827 - time in ms in future and not in past | xargs du --max-depth=0 > foldersizesreport.csv
I have a file called Regions.ini that looks like this:
Code:
[Granite]
RegionUUID = 54ab7cd2-0e70-49b7-8020-8dbeb84c08d0
Location = 9991,10007
InternalAddress = 0.0.0.0
InternalPort = 9001
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9
[Syenite]
RegionUUID = 8fc56fdd-0afd-4074-9432-0ae8f42b799f
Location = 9992,10007
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9
What I need to do is find out what the IP address is after "ExternalHostName ="
After that I will need to compare that IP to whatismyip and if it's different then replace it but that is easy to do with sed. I just can't figure this simple hurdle out.
After untaring a mysql file (very large) I'm trying to find where the file listed below has gone. I did a search on the file name:
fine / -name 'mysql-qui-tools-5.0' -print
But can't find the file.
-rwxr-xr-x root/root 9651820 2007-05-02 11:46:01 mysql-gui-tools-5.0/mysql-query-browser-bin
I have the tar file of glibc-2.12.1, but now I want to edit the SPEC file. I can't find it. For those that want a "why", I'm trying to make it smaller. So simply, where is the SPEC file for glibc? (rpmbuild cannot find it in the *.tar.gz file).
View 4 Replies View RelatedI use find / -name myfile to search files. But it will print out a very long list such as follow:
Code:
...
find: /var/empty/sshd: Permission denied
find: /etc/audit: Permission denied
find: /etc/httpd/conf/ssl.crl: Permission denied
find: /etc/httpd/conf/ssl.crt: Permission denied
[code]....
Is there any way i can find a file with specific word inside it.For example if i want to find a file which has some text written inside it.How would i form a command to search them?
View 5 Replies View RelatedI have a folder hierarchy with many sub-folder levels under a set of parent folders. Based on the application design and business use, files are written to different locations on a daily basis. I want to find out the last updated file in the folder structure and its location at any given time. How can I do that?
View 2 Replies View Relatedhow to find phpmyadmin read me file in redhat5
View 1 Replies View Relatedi am trying to find all 3 and 4-character length words in my file (which is huge and has alot of entries in it, a big fat wordlist!).My attempt with this regular expression (which I thought should work, found something on length search here: [URL]
cat sorted_noapostrophe.txt| grep '.{3,4}'
but it returns no results? Also to find any words starting with 'f' which are between 3 and 5 characters (inclusive) long, how can this be done?
am trying to write a shell script to find the size of a particular log file and if the log size grows, script should mail the changes to the administrator or a any user so script should monitor the log file continuously in a time interval, how can i do that?
I tried with these codes to find the file size but it throws me error says command not found
$s=$( stat -c %s mylogfile.log)
echo $s
how do I find a phrase/word recursively in a file tree in Linux?I tried find . -name ./* | grep my_phraseand I tried grep -r "register_long_arrays" *
View 5 Replies View RelatedHow to find the filesize of a flash which is not exactly stored in the temp but redirected by a fd.
flash31 -> /tmp/FlashXXvsg1uY (deleted) directory is /proc/processid
Chrome is downloading a flash and I can see in the proc directory the flash file, How can I see the current file size of such a file ?