![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| moving files after ls -lt command | pochaman | Shell Programming and Scripting | 8 | 12-08-2008 06:09 PM |
| Moving Files | iAm4Free | Shell Programming and Scripting | 5 | 03-28-2007 05:13 AM |
| moving between vi files | aya_r | Shell Programming and Scripting | 2 | 08-23-2005 05:36 AM |
| moving files ?? | rocker40 | UNIX for Dummies Questions & Answers | 9 | 11-09-2003 08:36 PM |
| moving only files... | sskb | UNIX for Dummies Questions & Answers | 12 | 11-19-2001 03:28 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Moving files to 'trash'
Hi I'm new to Linux, and I'm trying to write a shell script where I remove a specific file (i.e file1 or file1.txt), but i don't actually remove it, i move it to a directory called 'trash' - in vi I created a file with the path /usr/bin/del and in it I have:
mv $file /home/trash, but I'm getting an error message that says missing argument. I also tried mv *.* /home/trash, which sort of worked and I thought I had got it until I realised it moved ALL the files in the directory I was in to the 'trash' directory... Any help would be awesome. Jodi |
| Bookmarks |
| Tags |
| $file, mv command, restore |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|