To match your requirement, the 'date' command should be:
The %Y gives a 4-digit year.
Statements like "which is not working" tell us nothing. What went wrong?
Maybe your script should be something like:
Btw. The date format YYYYMMDD etc. is much better than DDMMYYYY etc. in filenames because the files will come out in chronogical order in a default "ls" directory list.
ive looked and couldnt find an answer...
can someone tell me how i can replace spaces and characters with an "_" on multiple folders?
thanx muchly. (1 Reply)
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Hi Guys,
I need a help. I have 1130 zip files. Each one of them has files including 1 html file with long file name (includes special charactors, Alphabetic and numbers).
I have copied all 1130 zip files to my linux system and extracted using below command.
Find . -name "*.zip" -exec... (7 Replies)
Hi guys,
I have lots of files that look like:
ABC.packed.dir
DEF.packed.dir
GHI.packed.dir
etc...
I would like them to have more of the usual naming convention
ABC
DEF
GHI
etc...
so I was thinking that I could: (2 Replies)
What am I missing?
find: 0652-009 There is a missing conjunction
find: 0652-009 There is a missing conjunction
find: 0652-009 There is a missing conjunction
find: 0652-009 There is a missing conjunction
find: 0652-009 There is a missing conjunction
find: 0652-009 There is a missing... (3 Replies)
Hi All,
I have below directory structure and from these directories, I would like to fetch the last two days list of directories and append a '0' (zero) to those directories.
bash-4.1$ ls -lrt
total 32
drwxr-xr-x+ 6 root root 9 Sep 5 01:05 tested-597
drwxr-xr-x+ 6 root root 9 Sep 9... (3 Replies)
Hi all,
I need to rename more file name in one command or script.
The files have this structure:
XxY - filename.doc
where X and Y are numbers and the x is the letter itself.
I need to rename these files with this structure:
string.S0XEY.filename.doc
the string is a suffix that... (8 Replies)
Hi,
Friends, i have a requirement where i need to rename my files residing in multiple sub directories and move them to one different directory along with some kind of directory indicator.
For eg:
test--is my parent directory and it has many files such as
a1.txt
a2.txt
a3.txt
... (5 Replies)
Hi All,
Just started learning unix and stuck into below issue.
Suppose i have folder structure as below.
Dir1/Dir2/Dir3/File1.msg
I am looking to rename the file name from File1.msg to File2.msg but from the parent Dir1
From Dir3 i can easily run the command like
mv File1.msg... (2 Replies)
Discussion started by: Gurjeet Singh
2 Replies
LEARN ABOUT ULTRIX
macstream
MACSTREAM(1) General Commands Manual MACSTREAM(1)NAME
macstream - Convert a series of files to a MacBinary stream
SYNOPSIS
macstream [ - options ] files
DESCRIPTION
macstream takes the files specified in files and combines them to a MacBinary stream on standard output subject to the options specified.
If files also specifies directories they are followed recursively, and all files found will be put in the MacBinary stream, together with
directory information.
OPTIONS
In the absence of any options, macstream takes the specified files and silently combines them to a MacBinary stream, writing the result to
standard output. Directories named in files are followed recursively, all files found will be put in the MacBinary stream, together with
directory information. Files are assumed to be in MacBinary format. However, if the filename ends with .info the file is assumed to be
the info fork of a MacIntosh file split amongst more than one file. In that case the files with .data and .rsrc extension are also read
(if present). Also, if the info fork is mentioned in the parameter list, the names of data and resource forks can also be mentioned, but
those will be ignored (this is to allow wild-card expansion by the shell.) Further, if some form of AppleShare is supported by the
installed program, and if the current directory, or one of the directories found during recursive processing, is a directory in the format
of the supported version of AppleShare, those files will be handled according to the properties of AppleShare.
-r No intelligent file-processing is performed; all files named are assumed to be plain resource files, and are written as MacIntosh
resource files with creator "RSED" and type "RSRC", unless another creator and/or type are specified.
-d No intelligent file-processing is performed; all files named are assumed to be plain data files, and are written as MacIntosh data
files with creator "MACA" and type "TEXT", unless another creator and/or type are specified.
-u As -d, but the codes for CR and LF are interchanged.
-U Is a synonym for -u.
-c creator
Defines the creator name to be used if one of the previous options is specified.
-t type
Defines the type name to be used if one of the previous options is specified.
-l List every file and directory processed.
-i Do not output files, give information only (implies -l.)
-q Ask the user for every file/directory whether it should be visited (implies -l.)
-V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately.
-H Give short information about the options. Other options are ignored and the program quits immediately.
BUGS
As this is a beta release, there may still be some problems.
SEE ALSO macutil(1)AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl)
3rd Berkeley Distribution October 22, 1992 MACSTREAM(1)