03-01-2005
Quote:
Originally Posted by swainaina
Write a script called save which copies a file into a special directory, and another called recover which copies a file back out of the special directory. The user of the script should not be aware of the location of the special directory (obviously the script will be).
This does indeed look like homework - it appears that the question has been copied and pasted directly from the assignment sheet.
Please read the
rules.
Quote:
Originally Posted by the rules
(6) Do not post classroom or homework problems.
Thanks,
ZB
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!
can anyone tell me how to save a file from command line?
Any help appreciated. (2 Replies)
Discussion started by: hufs375
2 Replies
2. UNIX for Advanced & Expert Users
There is a file A.lcf.
I am updating the file and saving it .
But as soon as I am logging off and then logging in I am finding that the updated changes are not there in the file. (5 Replies)
Discussion started by: suchismitasuchi
5 Replies
3. UNIX for Dummies Questions & Answers
Hi there,
How can I add the current session command history to .bash_history?
During a session, I type several commands.
If I close my session, those commands are added to the file .bash_history.
But if my session crashes or just if I loose connection, those commands are lost.
Is there... (6 Replies)
Discussion started by: chebarbudo
6 Replies
4. Shell Programming and Scripting
hi there !
i have exactly the same problem like this guy here
https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html
i am not able to save the curl verbose output..
the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies
5. Shell Programming and Scripting
Hi, ¿how i can to save abbrevations in vi? (4 Replies)
Discussion started by: Leo Gutierrez
4 Replies
6. UNIX for Dummies Questions & Answers
is i want to sort or delete lines etc etc to a file, how do i save the changes.
example i do sort file > file
when i do cat file, all data is erased.
thanks. (2 Replies)
Discussion started by: hobiwhenuknowme
2 Replies
7. Post Here to Contact Site Administrators and Moderators
I have run into old threads/posts that I'd like to save for future reference.
Is there a way to mark the thread or save to my favorite? Is this the same as subscribing? I don't really want to subscribe. I just want to save something I find interesting I can come back to later.
Thanks. (2 Replies)
Discussion started by: giannicello
2 Replies
8. Shell Programming and Scripting
Hi all,
my log server is completely full with logs.
I have used gzip to compress logs, but as i tried, 7z has a better compression, it saves the half size of my server. I want to uncompress .gz files, then compress them to .7z
Can you please help me with a script that does this:
1.... (2 Replies)
Discussion started by: arrals_vl
2 Replies
9. Shell Programming and Scripting
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
10. UNIX for Dummies Questions & Answers
If I have a A.log
1 Air Flow Monitor : 34.070 Degrees C
2 Air Flow Monitor : 41.730 Degrees C
3 Air Flow Monitor : 35.340 Degrees C
4 Air Flow Monitor : 33.370 Degrees C
5 Air Flow Monitor : 36.770 Degrees C
6 Air Flow Monitor : 45.910 Degrees C
7 Air Flow Monitor ... (1 Reply)
Discussion started by: sabercats
1 Replies
LEARN ABOUT LINUX
ip6tables-apply
IPTABLES-APPLY(8) iptables 1.6.1 IPTABLES-APPLY(8)
NAME
iptables-apply - a safer way to update iptables remotely
SYNOPSIS
iptables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]}
DESCRIPTION
iptables-apply will try to apply a new rulesfile (as output by iptables-save, read by iptables-restore) or run a command to configure
iptables and then prompt the user whether the changes are okay. If the new iptables rules cut the existing connection, the user will not be
able to answer affirmatively. In this case, the script rolls back to the previous working iptables rules after the timeout expires.
Successfully applied rules can also be written to savefile and later used to roll back to this state. This can be used to implement a store
last good configuration mechanism when experimenting with an iptables setup script: iptables-apply -w /etc/network/iptables.up.rules -c
/etc/network/iptables.up.run
When called as ip6tables-apply, the script will use ip6tables-save/-restore and IPv6 default values instead. Default value for rulesfile is
'/etc/network/iptables.up.rules'.
OPTIONS
-t seconds, --timeout seconds
Sets the timeout in seconds after which the script will roll back to the previous ruleset (default: 10).
-w savefile, --write savefile
Specify the savefile where successfully applied rules will be written to (default if empty string is given:
/etc/network/iptables.up.rules).
-c runcmd, --command runcmd
Run command runcmd to configure iptables instead of applying a rulesfile (default: /etc/network/iptables.up.run).
-h, --help
Display usage information.
-V, --version
Display version information.
SEE ALSO
iptables-restore(8), iptables-save(8), iptables(8).
LEGALESE
Original iptables-apply - Copyright 2006 Martin F. Krafft <madduck@madduck.net>. Version 1.1 - Copyright 2010 GW <gw.2010@tnode.com or
http://gw.tnode.com/>.
This manual page was written by Martin F. Krafft <madduck@madduck.net> and extended by GW <gw.2010@tnode.com or http://gw.tnode.com/>.
Permission is granted to copy, distribute and/or modify this document under the terms of the Artistic License 2.0.
iptables 1.6.1 IPTABLES-APPLY(8)