This is an assignment question, I know i should do it myself, but believe me i have just learned this subject and couldn't find the answer. Please if someone could give me the answer, i would be greatfull. And please if you could hurry because I have to submit on march 3 and only this question is left. Here is the question:
Reduce the number of key strokes to execute this command: tar -t-v-f/dev/fd0
2 Years Ago
Related Article:for loop problems...UNIX script
is a Shell Scripting discussion thread by bossman5000 that has 2 replies, was last updated 1 year ago and has been tagged with the keywords: loop, script, shell, unix.
Unrelated (except that it uses tar), here's a nice trick for copying trees while preserving file owner, permissions and date attributes. Every Linux/Unix hack should know this:
$ cd /source_dir
$ tar -cf - * | (cd /target_dir; tar xvf -)
In the source directory we create an archive of all the contents sending the stream to std-out. We then pipe the stream to to a grouped command, which first changes directory, and then extracts the archive from the std-in stream.