| | |
Bash script
![]() |
•
•
Join Date: Sep 2007
Posts: 60
Reputation:
Solved Threads: 0
Hi to all the experts here, I am a true newbie on bash script and I have a couple of questions need to seek help:
1. What does "safe" delete command script means? I am confused with this statement:
Write a "safe" delete command script. Filenames passed as command-line arguments to this script are not deleted, but instead gzipped if not already compressed, then moved to a /home/username/trash directory.
Basically it is an assignment, does it means those file names typed in command line will not be deleted and compress it to tarz if it is not? How to implement it using file command? Thanks in advance.
1. What does "safe" delete command script means? I am confused with this statement:
Write a "safe" delete command script. Filenames passed as command-line arguments to this script are not deleted, but instead gzipped if not already compressed, then moved to a /home/username/trash directory.
Basically it is an assignment, does it means those file names typed in command line will not be deleted and compress it to tarz if it is not? How to implement it using file command? Thanks in advance.
It means your script is suppossed to delete the files, but rather than actually deleting them, you will simply tar-gzip them and move them somewhere else. Essentially the "trash bin" process.
Last edited by masijade; Oct 3rd, 2008 at 4:17 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- how to recursive search of subdiretories in BASH script (Shell Scripting)
- Linux Bash Script (Shell Scripting)
- Urgent: Help on grep the nearest value using bash script (Shell Scripting)
- need help with figuring out sizeof in bash script (Shell Scripting)
- HELP! Who can solve this bash script? (Shell Scripting)
- Bash script prob (Kernels and Modules)
- A question on java script?(Please answer ASAP) (Java)
Other Threads in the Shell Scripting Forum
- Previous Thread: How can i set column width in unix?
- Next Thread: finding files for specified date
| Thread Tools | Search this Thread |






