Search Results

Search: Posts Made By: sumang24
1,581
Posted By Don Cragun
I am completely at a loss from your above...
I am completely at a loss from your above statements. In your first post in this thread you said you had two files (one that you referred to as arch_all and one that you said "Combined file with...
1,581
Posted By greet_sed
Hi, can you try something like this ? ...
Hi,

can you try something like this ?

tar tf all.tar.gz | grep ".xml" > all-xml-file-list

#if you dont have file list from batch ,create it
rm -f batch-file-list
for i in bat*.tar.gz
do...
5,795
Posted By Aia
I do believe one of these is a link. I am...
I do believe one of these is a link.


I am sorry, but it appears that it would create links as well and you are going to see what it appears to be the same file several times.

A better...
5,795
Posted By Aia
Actually, this is happening because find is...
Actually, this is happening because find is returning the current directory as well. If you do a find . ! -name export.tar.gz the first result is .
This might work.
find . ! -name export.tar.gz !...
5,795
Posted By Aia
File names can have the same name, but not the...
File names can have the same name, but not the same path (location where they leave)

Example of two files with the same name
$ tree
.
├── dir1
│ └── sumang24.file
└── dir2
└──...
5,795
Posted By Aia
Try creating the archive outside of the directory...
Try creating the archive outside of the directory where find is working on.
find . -print | tar cpzf ../export.tar.gz -T -
2,663
Posted By CarloM
You want to purge the files from the tar as...
You want to purge the files from the tar as they're extracted?

You could try listing the files in the tar, then extracting & deleting each one in turn. Something like:
filelist=$(tar -tvf...
2,480
Posted By Smiling Dragon
The s indicates you have x set but also...
The s indicates you have x set but also setuid/setgid.
You can explicitly set it to what you want with either:
chmod 0755 oracle
orchmod u=rwx,go=rx oracle

But you could also just remove the...
3,597
Posted By Yoda
VAR1="FOO" if [ "$ORACLE_SID" = "$VAR1" ] && ls...
VAR1="FOO"
if [ "$ORACLE_SID" = "$VAR1" ] && ls /tmp/file_checker/testing*.txt > /dev/null 2> /dev/null
then
echo "TEST21"
else
echo "file does not exist"
fi
3,597
Posted By Corona688
It was outside [ ] before, but you put it in [ ]...
It was outside [ ] before, but you put it in [ ] , where it expects an expression not a command.

if [ "$ORACLE_SID" = "$VAR1" ] && ls /tmp/file_checker/testing*.txt >/dev/null 2>/dev/null
then...
3,597
Posted By Yoda
Redirect stderr to /dev/null like I suggested...
Redirect stderr to /dev/null like I suggested above:
if ls /tmp/file_checker/testing*.txt > /dev/null 2> /dev/null; then
3,597
Posted By Yoda
Another approach: if ls...
Another approach:
if ls /tmp/file_checker/testing*.txt > /dev/null 2> /dev/null; then
echo "TEST21"
fi
3,597
Posted By radoulov
for f in /tmp/file_checker/testing*.txt; do [...
for f in /tmp/file_checker/testing*.txt; do
[ -s "$f" ] && echo TEST21 && break
done

Note that -s returns true if the file exists and its size is greater than zero.
4,283
Posted By Yoda
Using Scott's solution, you can add an awk...
Using Scott's solution, you can add an awk statement to get latest file:-
ls -ltr | sed "s/\.[^\.]*$//" | awk ' { file=$NF; } END { print file; } '
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 07:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy