Hi all,
i'm new here in this forum. I really like the helpful answers in this forum.
Here a short question.
For a script i have to sort files by date and exclude the files of the actual date.
Sorting the files by date and preparing the output for awk is done by this line:
ls -l... (3 Replies)
I am a newbie to scripting.
I need a korn shell script to copy log files of current day to archive folder and rename with current days date stamp.
I would really appreciate your help.
File structure is as follows. Everyday files get overwritten, so I need copy to a archive directory and... (3 Replies)
Hi,
Any idea to get display of date - n ( n=1,2,3,4 etc) ?
For example , dtoudt will easily execute by dtoudt -3 and result is
>dtoudt -3
1234852529 Date 2009-2-17 time 14:35:29 day 47
How to get it display in 20090217 instead ?
Maybe you have other suggestion to display date... (0 Replies)
Hello,
I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
I want to move all files from one directory to another directory excluding today (sysdate files) on daily basis.
file name is in pattern file_2013031801, file_2013031802 etc (2 Replies)
Hi. I am a new Unix admin and I've been tasked to write a ksh script that copies my .profile into my /home directory on all servers. I'm new to this and having a difficult time scripting it. Any ideas? (6 Replies)
Hi,
i want to make script. In a directory everyday( exclude sat and sun) in between 10 pm to 1 am there are 2 files comes and when file comes it will mail us. Format for files is mentioned below.
please help me on making this, and also have year end consider and if files come after 12 am it... (6 Replies)
I also posted this on macrumors forum, then i realized that this is a more suitable forum for matters like this. I apologize for the username, I was looking at a bag of doritos when it asked me for a username. lol
I need a program (see below for what I've tried) and I think a shell program will... (23 Replies)
Hi Team,
I'm new to unix and i have a requirement to copy or move files from one directory to another based on current date mentioned in the .zip file name. Note that i need to copy only the recent zip file. please help me with the code
i tried the code as:
#! /usr/bin/sh
find... (3 Replies)
Hi Community!
Following on from this code in another thread:
#!/bin/bash
file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`
file_date=`/bin/date -d "$file_string"`
file_epoch=`/bin/date -d "$file_string" +%s`
now_epoch=`/bin/date +%s`
if
then
#let... (2 Replies)
Discussion started by: Greenage
2 Replies
LEARN ABOUT PLAN9
mkfs
MKFS(8) System Manager's Manual MKFS(8)NAME
mkfs, mkext - archive or update a file system
SYNOPSIS
disk/mkfs [-aprv] [-n name] [-s source] [-u users] [-z n] proto ...
disk/mkext [-d name] [-u] [-h] [-v] file ...
DESCRIPTION
Mkfs copies files from the file tree source (default /) to a kfs file system (see kfs(4)). The kfs service is mounted on /n/kfs, and
/adm/users is copied to /n/kfs/adm/users. The proto files are read, and any files specified in them that are out of date are copied to
/n/kfs.
Each line of the proto file specifies a file to copy. Indentation is significant, with each level of indentation corresponding to a level
in the file tree. Fields within a line are separated by white space. The first field is the last path element in the destination file
tree. The second field specifies the permissions. The third field is the owner of the file, and the fourth is the group owning the file.
The fifth field is the name of the file from which to copy; this file is read from the current name space, not the source file tree. All
fields except the first are optional.
Names beginning with a are expanded as environment variables. If the first file specified in a directory is all of the files in that
directory are copied. If the first file is all of the files are copied, and all subdirectories are recursively copied.
Mkfs copies only those files that are out of date. Such a file is first copied into a temporary file in the appropriate destination direc-
tory and then moved to the destination file. Files in the kfs file system that are not specified in the proto file are not updated and not
removed.
The options to mkfs are:
a Instead of writing to a kfs file system, write an archive file to standard output, suitable for mkext. All files in proto, not just
those out of date, are archived.
n name Use kfs.name as the name of the kfs service (default kfs).
p Update the permissions of a file even if it is up to date.
r Copy all files.
s source
Copy from files rooted at the tree source.
u users
Copy file users into /adm/users in the new system.
v Print the names of all of the files as they are copied.
z n Copy files assuming kfs block n (default 1024) bytes long. If a block contains only 0-valued bytes, it is not copied.
Mkext unpacks archive files made by the -a option of mkfs. The -d option specifies a directory (default /n/kfs) to serve as the root of
the unpacked file system. The -u option, to be used only when initializing a new fs(4) file system, sets the owners of the files created
to correspond to those in the archive and restores the modification times of the files. (This is only permitted at the initial load of the
files into a file system.) Each file on the command line is unpacked in one pass through the archive. If the file is a directory, all
files and subdirectories of that directory are also unpacked. When a file is unpacked, the entire path is created if it does not exist.
If no files are specified, the entire archive is unpacked; in this case, missing intermediate directories are not created. The -v option
prints the names and sizes of files as they are extracted; -h prints headers for the files on standard output instead of unpacking the
files.
EXAMPLES
Make an archive to establish a new file system:
disk/mkfs -a -u files/adm.users -s dist proto > arch
Unpack that archive onto a new file system:
srv il!newfs
mount -c /srv/il!newfs /n/newfs
disk/mkext -u -d /n/newfs < arch
FILES
/lib/proto
directory of prototype files.
/lib/proto/portproto
generic prototype file.
SOURCE
/sys/src/cmd/disk/mkfs.c
/sys/src/cmd/disk/mkext.c
SEE ALSO prep(8), kfscmd(8), wren(3), pip(8)MKFS(8)