Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8365729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:43:45+00:00 2026-06-09T12:43:45+00:00

Let me give an example: the script should detect, that file creation is finished

  • 0

Let me give an example:
the script should detect, that file creation is finished :

#!/bin/bash
CID=$1
TYPE=$2
echo "$TYPE$CID" >scan.log
sleep 1
FILE=$TYPE$CID.jpeg
until [ $(ls -l $FILE | awk '{print $5}') -gt 2000 ]
do
   echo "sleeping" >> scan.log
   sleep 0.4
done
SIZE=`du -h $FILE`
echo "$DT $SIZE " >> scan.log
cp $FILE $TYPE.jpegs

When I call execute it from the shell it is very fast : not one line “sleeping” in the output /scan.log/, so the file is ready in 1 second /first sleep is enough/
Meanwhile, when I call the same script from QT, I have to wait more than 5 seconds /more than 14 lines of sleeping/

Is it possible to fix it? as time is critical in my project…
Thank you in advice

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:43:46+00:00Added an answer on June 9, 2026 at 12:43 pm

    Thank you everybody, I find out the solution,
    the problem was QT cashe…
    so I just used QFileInfo::refresh(),
    QProcess is useless

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First let me explain that I have this script that should let users enter
Let me explain best with an example. Say you have node class that can
I have tried using a example file using PHPExcel script to extract data from
Let me give an example. This code works within a manager: protected boolean navigationMovement(int
To be more specific let me give an example : If I search a
Possible Duplicate: extracting the letter in between tags okie let me give an example
I am using an iFrame in my application. Let me give an example here.
There is a website that I visit often... let's call it www.example.com. And, I
Please, let me give an example. Say, we have: a CheckedListBox control enumerating names
I've created a bunch of projects in Eclipse 3.7.2. Let's give some of them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.