1.

HDCS9-156039439P:defunct abc$ ls -ltr total 320 drwxr-xr-x 2 abc staff 68 Jan 28 12:46 1082970465 -rwxrwxrwx 1 abc staff 33 Jan 28 12:47 DEFUNCT.txt drwxr-xr-x 3 abc staff 102 Jan 28 13:20 search_data -rwxrwxrwx 1 abc staff 0 Jan 28 13:29 1087016121 -rw-r--r-- 1 abc staff 155236 Jan 28 13:33 output_defunctusers_move +ment.txt -rwxrwxrwx 1 abc staff 680 Jan 28 13:33 data.pl drwxr-xr-x 2 abc staff 68 Jan 28 13:42 1078036045



2.
HDCS9-156039439P:defunct abc$ cat DEFUNCT.txt 1087016121 1082970465 1078036045
3.

HDCS9-156039439P:defunct abc$ cat data.pl #!/usr/bin/perl open $outputfile, ">>","output_defunctusers_movement.txt" or die "$0: +open : $!"; $count=0; open(DATA, "</Users/abc/defunct/DEFUNCT.txt") or die "Couldn't open fi +le /Users/abc/defunct/DEFUNCT.txt ,$!"; @lines= <DATA>; for ($i=0;$i<=$#lines;$i++) { print $lines[$i]; `mv /Users/abc/defunct/"$lines[$i]" /Users/abc/defunct/search_data`; $count++; print $outputfile "$count . Successfully moved file : $lines[$i] \n"; } close(DATA) || die "Coulnt close file /Users/abc/defunct/DEFUNCT.txt p +roperly";
4.
o/p :
1087016121 mv: rename /Users/abc/defunct/1087016121 to /Users/abc/defunct/search_data/1087016121 : No such file or directory 1082970465 mv: rename /Users/abc/defunct/1082970465 to /Users/abc/defunct/search_data/1082970465 : No such file or directory 1078036045 mv: rename /Users/abc/defunct/1078036045 to /Users/abc/defunct/search_data/1078036045 : No such file or directory HDCS9-156039439P:defunct abc$
Why is the move command not working? I need a solution without modules. Folders do exists but why is it showing an error no such file or directory?


In reply to System Command mv not working - Require a solution without modules. by G Nagasri Varma

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.