Skip to main content

call "system" with no I-O messages ?

  • Aug 31, 2021 8:37 PM UTC
  • 2 replies
  • 10 views

Alberto Rossi

Hello,

i use this command on SO linux : CALL "C$SYSTEM" USING "mv -f  /usr/dos/file1.txt  /usr/xxx/file2.txt" 

if file1.txt is locked system display "cannot mv file locked ... " 

how can i do to not display this message ? 

2 replies

Andreas Weinand
Forum|alt.badge.img+2
  • Participating Frequently
  • Sep 1, 2021 11:05 AM UTC

Hello,

i use this command on SO linux : CALL "C$SYSTEM" USING "mv -f  /usr/dos/file1.txt  /usr/xxx/file2.txt" 

if file1.txt is locked system display "cannot mv file locked ... " 

how can i do to not display this message ? 

Hi,

you could try something like this: "mv -f /usr/dos/file1.txt  /usr/xxx/file2.txt 2> /tmp/trash"


Alberto Rossi
  • Author
  • Participating Frequently
  • Sep 1, 2021 11:40 AM UTC

Hi,

you could try something like this: "mv -f /usr/dos/file1.txt  /usr/xxx/file2.txt 2> /tmp/trash"

ok thanks it works!