Sponsored Content
Top Forums Shell Programming and Scripting copying files with spaces in the filename Post 302337508 by jamshedj on Friday 24th of July 2009 09:59:43 AM
Old 07-24-2009
That works....Many Thanks!!!!

---------- Post updated at 08:59 AM ---------- Previous update was at 08:43 AM ----------

Hi

I have managed to copy a few files into a directory but since there are too many files it looks a bit untidy .

Is there a way i can directly copy all of them into a compresses file(.gz).

This would make it easier to ftp the file as well...Many Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

moving files with spaces in filename from one directory to another

Hello, When I run following script #!/bin/bash cd ~/directory1 mv `ls -trF | grep -v / | tail -10 ` ~/directory2 works fine with filenames not having any space but runs into issues with filenames that have spaces tried with $file variable still doesnot work. Can someone help me (4 Replies)
Discussion started by: asakhare
4 Replies

2. Shell Programming and Scripting

List files with spaces in filename

I have a text file containing files in a directory structure i.e. /project/hr/raw/jcpdatav/datav_aug03 /project/hr/raw/jcpdatav/comb8121sep02n /project/hr/raw/jcpdatav/datav_feb04_ons /project/hr/raw/jcpdatav/corpsick_jun06 /project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Discussion started by: mr_crosby
3 Replies

3. Shell Programming and Scripting

Removing spaces within Filename

Hello, I have a Folder (myfile) which contain the following files: P$12789865KR +N+01+OM+16102009165416.nu P$M1-508962GD +N+01+ALP+14102009094417.nu Is there a sed command(s) that will loop through this folder and remove the spaces that exists in the filename? Any help would be... (7 Replies)
Discussion started by: Fishn
7 Replies

4. Shell Programming and Scripting

spaces in filename

Hello I canīt find an answer to my problem. I am trying to tar some files with spaces #!/bin/sh files="/var/installer/server Config /var/installer/client user /var/installer/Svenskt Language /var/installer/GUI user Plugin /var/installer/Firefox Plugin" tar -czvf /tmp/files.tar.gz... (14 Replies)
Discussion started by: Lusen
14 Replies

5. Shell Programming and Scripting

Copying files using $filename

Hi, I've a problem. Here is the code: #!/bin/ksh echo "enter a file name" read a cd /home/linux1/sam if then echo "file exists" cp $a $a_bkp else echo "file doesn't exist" fi when executed the o/p is: enter a file name contact file exists cp: missing destination file (4 Replies)
Discussion started by: sam_bd
4 Replies

6. UNIX for Dummies Questions & Answers

Copying files with spaces in the filename in a for loop

Hi all, I've been tangoing with this one for a couple of days now and I'm still not making any progress. Basically I'm trying to match three numbers in a string from a text file with matching numbers in a jpeg, and then copying the results to another folder. Data looks like this: Model:... (4 Replies)
Discussion started by: faceonline
4 Replies

7. Shell Programming and Scripting

Rename all files (filename with spaces) to different extension

Hi, I have files with filenames as below. SGM Daily Sales Email-en-us-05312012.xlwa I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders. I have the following script. #!/bin/ksh for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies

8. Solaris

While copying files from windows to Solaris5.8 with filezilla length of the filename changed

Hello I am copying a tar from windows7 to Solaris with filezilla i could see, some characters in the name of the file get deleted. I could see only substring of the filename eg: original filename :abcdefghijklmnopqrstu.h i can see like abcdefghijklm solution to this problem is highly... (2 Replies)
Discussion started by: Revathi R
2 Replies

9. Shell Programming and Scripting

Creating Multiple data files with spaces in the filename

Hi, I have a list of filenames in the format with Spaces in the filename. As an example : Sample File 1.txt Sample File 2.txt Sample File 3.txt.....I have about 100 files like this. I am trying to create a block of code or use an available command to a) Create a file b) Put in some... (2 Replies)
Discussion started by: ban3rj33
2 Replies

10. Shell Programming and Scripting

Remove spaces in filename

Hi team, Here's a requirement for me. Here are the list of files i have in a unix directory. W 2 A D_2014.csv W 3 A D_2014.csv W 4 A D_2014.csv /home/kmani00-> uname -a AIX sliyyvxx 1 6 00F613E54C00 /home/kmani00-> The file names has to be without spaces as follows. W2AD_2014.csv... (1 Reply)
Discussion started by: kmanivan82
1 Replies
TEXTUTIL(1)						    BSD General Commands Manual 					       TEXTUTIL(1)

NAME
textutil -- text utility SYNOPSIS
textutil [command_option] [other_options] file ... DESCRIPTION
textutil can be used to manipulate text files of various formats, using the mechanisms provided by the Cocoa text system. The first argument indicates the operation to perform, one of: -help Show the usage information for the command and exit. This is the default command option if none is specified. -info Display information about the specified files. -convert fmt Convert the specified files to the indicated format and write each one back to the file system. -cat fmt Read the specified files, concatenate them, and write the result out as a single file in the indicated format. fmt is one of: txt, html, rtf, rtfd, doc, docx, wordml, odt, or webarchive There are some additional options for general use: -extension ext Specify an extension to be used for output files (by default, the extension will be determined from the format). -output path Specify the file name to be used for the first output file. -stdin Specify that input should be read from stdin rather than from files. -stdout Specify that the first output file should go to stdout. -encoding IANA_name | NSStringEncoding Specify the encoding to be used for plain text or HTML output files (by default, the output encoding will be UTF-8). NSStringEncoding refers to one of the numeric values recognized by NSString. IANA_name refers to an IANA character set name as understood by CFString. The operation will fail if the file cannot be converted to the specified encoding. -inputencoding IANA_name | NSStringEncoding Force all plain text input files to be interpreted using the specified encoding (by default, a file's encoding will be deter- mined from its BOM). The operation will fail if the file cannot be interpreted using the specified encoding. -format fmt Force all input files to be interpreted using the indicated format (by default, a file's format will be determined from its contents). -font font Specify the name of the font to be used for converting plain to rich text. -fontsize size Specify the size in points of the font to be used for converting plain to rich text. -- Specify that all further arguments are file names. There are some additional options for HTML and WebArchive files: -noload Do not load subsidiary resources. -nostore Do not write out subsidiary resources. -baseurl url Specify a base URL to be used for relative URLs. -timeout t Specify the time in seconds to wait for resources to load. -textsizemultiplier x Specify a numeric factor by which to multiply font sizes. -excludedelements (tag1, tag2, ...) Specify which HTML elements should not be used in generated HTML (the list should be a single argument, and so will usually need to be quoted in a shell context). -prefixspaces n Specify the number of spaces by which to indent nested elements in generated HTML (default is 2). There are some additional options for treating metadata: -strip Do not copy metadata from input files to output files. -title val Specify the title metadata attribute for output files. -author val Specify the author metadata attribute for output files. -subject val Specify the subject metadata attribute for output files. -keywords (val1, val2, ...) Specify the keywords metadata attribute for output files (the list should be a single argument, and so will usually need to be quoted in a shell context). -comment val Specify the comment metadata attribute for output files. -editor val Specify the editor metadata attribute for output files. -company val Specify the company metadata attribute for output files. -creationtime yyyy-mm-ddThh:mm:ssZ Specify the creation time metadata attribute for output files. -modificationtime yyyy-mm-ddThh:mm:ssZ Specify the modification time metadata attribute for output files. EXAMPLES
textutil -info foo.rtf displays information about foo.rtf. textutil -convert html foo.rtf converts foo.rtf into foo.html. textutil -convert rtf -font Times -fontsize 10 foo.txt converts foo.txt into foo.rtf, using Times 10 for the font. textutil -cat html -title "Several Files" -output index.html *.rtf loads all RTF files in the current directory, concatenates their contents, and writes the result out as index.html with the HTML title set to "Several Files". DIAGNOSTICS
The textutil command exits 0 on success, and 1 on failure. CAUTIONS
Some options may require a connection to the window server. HISTORY
The textutil command first appeared in Mac OS X 10.4. macOS September 9, 2004 macOS
All times are GMT -4. The time now is 04:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy