ah ok i get it. well, try mo itong suggestion. instead of using a pipe, gamiting mo ang command substitution. basically you surround the first command with backquotes and use it as your first parameter in the mv command:
mv `find / - user student` /var/student
bale ang mangyayari ay the output of the backquoted `find...` command will now serve as your mv command's first n parameter(s). /var/student is the last parameter which, according to the man page for the mv command serves as the destination directory.
pero bago mo gawin yung above changes mag-test ka muna. make sure that the output of the find command is what you expect.
here's an example:
administrator@asus-a8jn ~ $ ls -l
total 4
drwxr-xr-x 2 administrator administrator 4096 Jan 30 13:36 Desktop
lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Documents -> /data/Documents
lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Downloads -> /data/Downloads
lrwxrwxrwx 1 administrator administrator 13 Jul 1 2010 Dropbox -> /data/Dropbox
lrwxrwxrwx 1 administrator administrator 15 Jul 2 2010 FrostWire -> /data/FrostWire
lrwxrwxrwx 1 administrator administrator 9 Jul 11 2010 ISO -> /data/ISO
lrwxrwxrwx 1 administrator administrator 11 Jul 1 2010 Music -> /data/Music
lrwxrwxrwx 1 administrator administrator 14 Jul 1 2010 Pictures -> /data/Pictures
lrwxrwxrwx 1 administrator administrator 12 Jul 1 2010 Public -> /data/Public
lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Templates -> /data/Templates
lrwxrwxrwx 1 administrator administrator 12 Jul 1 2010 Videos -> /data/Videos
lrwxrwxrwx 1 administrator administrator 14 Jul 1 2010 dwhelper -> /data/dwhelper
administrator@asus-a8jn ~ $ echo "AND THE WINNERS ARE" `ls -l` "COME ON DOWN."
AND THE WINNERS ARE total 4 drwxr-xr-x 2 administrator administrator 4096 Jan 30 13:36 Desktop lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Documents -> /data/Documents lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Downloads -> /data/Downloads lrwxrwxrwx 1 administrator administrator 13 Jul 1 2010 Dropbox -> /data/Dropbox lrwxrwxrwx 1 administrator administrator 15 Jul 2 2010 FrostWire -> /data/FrostWire lrwxrwxrwx 1 administrator administrator 9 Jul 11 2010 ISO -> /data/ISO lrwxrwxrwx 1 administrator administrator 11 Jul 1 2010 Music -> /data/Music lrwxrwxrwx 1 administrator administrator 14 Jul 1 2010 Pictures -> /data/Pictures lrwxrwxrwx 1 administrator administrator 12 Jul 1 2010 Public -> /data/Public lrwxrwxrwx 1 administrator administrator 15 Jul 1 2010 Templates -> /data/Templates lrwxrwxrwx 1 administrator administrator 12 Jul 1 2010 Videos -> /data/Videos lrwxrwxrwx 1 administrator administrator 14 Jul 1 2010 dwhelper -> /data/dwhelper COME ON DOWN.
reference for further reading:
http://www.injunea.demon.co.uk/pages/page206.htmHTH.