Sponsored Content
Full Discussion: add a extention to all files
Top Forums Shell Programming and Scripting add a extention to all files Post 302562009 by radoulov on Wednesday 5th of October 2011 05:08:21 PM
Old 10-05-2011
Code:
find /home/administrator/Maildir/test -type f ! -name '*.eml' -exec mv '{}' '{}'.eml \;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip extention from filename

Hey, How to strip the extention from filename? MY_XML.xml -> MY_XML MY_TEST_FILE.txt -> MY_TEST_FILE HELLO_WORLD.xls -> HELLO_WORLD Thanks in advance! (2 Replies)
Discussion started by: mpang_
2 Replies

2. UNIX for Advanced & Expert Users

Search files with specfic extention and later search content

Hi, I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search. -Lovin.V (2 Replies)
Discussion started by: lovi_v
2 Replies

3. Shell Programming and Scripting

changing file name not the file extention

Hello experts, I need to solve the problem stated below: 1.have to search for " operator.java" file and rename it to as OPERATOR.java 2.Also I have to change the following line inside the file: public class operator----->public class OPERATOR the only thing that i can think is... (2 Replies)
Discussion started by: mlhazan
2 Replies

4. Shell Programming and Scripting

Add extention to files recursively.

I want to add a .txt extension to all files in a directory and it's sub directories. So far I have managed to come up with this for the current directory but how do I do this recursively? for e in *; do mv "$e" "`echo $e | sed -e 's/\ /_/g'`.txt"; done Thanks (5 Replies)
Discussion started by: lewk
5 Replies

5. Shell Programming and Scripting

Listing files in a given directory with given extention

for some reason my code does not give the right number of files. can omeone help me please? (2 Replies)
Discussion started by: andrew1400
2 Replies

6. UNIX for Dummies Questions & Answers

problem with packages that have .tar.gz in the extention

Hi Everybody , I want to install some packages on sun Solaris , I download the packages it was for example openssl.tar.gz it is not data stream or sun packages , so I search and I found command called make solve this problem , but the packages of this command not found on my machine, so I... (7 Replies)
Discussion started by: hard_revenge
7 Replies

7. Shell Programming and Scripting

How to find complete file names in UNIX if i know only extention of file

Suppose I have a file which contains other file names with some extention . text file containt gdsds sd8ef g/f/temp_temp.sum yyeta t/unix.sum ghfp hrwer h/y/test.text.dat if then.... I want to get the complete file names, like for above file I should get output as temp_temp.sum... (4 Replies)
Discussion started by: panchal
4 Replies

8. Shell Programming and Scripting

sed to remove all lines in file that are not .vcf.gz extention

I am trying to use sed to remove all lines in a file that are nor vcf.gz. The sed below runs but returns all the files with vcf.gz in them, rather then just the ones that end in only that extention. Thank you :). file ... (9 Replies)
Discussion started by: cmccabe
9 Replies

9. Shell Programming and Scripting

find -ctime -1 cannot find files without extention

The problem is this one. I tar and gzip files on remote server Code: find . -ctime -1 | tar -cvf transfer_dmz_start_daily.tar *${Today}*.*; Command Code: find . -ctime -1 Doesn't find files without extension Code: .csv .txt I have to collect all files for current... (1 Reply)
Discussion started by: digioleg54
1 Replies

10. Shell Programming and Scripting

find -ctime -1 cannot find files without extention

The problem is this one. I tar and gzip files on remote server find . -ctime -1 | tar -cvf transfer_dmz_start_daily.tar *${Today}*.*; Command find . -ctime -1 Doesn't find files without extension .csv .txt I have to collect all files for current day, when the program... (1 Reply)
Discussion started by: digioleg54
1 Replies
SHAR(1) 						    BSD General Commands Manual 						   SHAR(1)

NAME
shar -- create a shell archive of files SYNOPSIS
shar file ... DESCRIPTION
shar writes an sh(1) shell script to the standard output which will recreate the file hierarchy specified by the command line operands. Directories will be recreated and must be specified before the files they contain (the find(1) utility does this correctly). shar is normally used for distributing files by ftp(1) or mail(1). SEE ALSO
compress(1), mail(1), tar(1), uuencode(1) BUGS
shar makes no provisions for special types of files or files containing magic characters. EXAMPLES
To create a shell archive of the program ls(1) and mail it to Rick: cd ls shar `find . -print` | mail -s "ls source" rick To recreate the program directory: mkdir ls cd ls ... <delete header lines and examine mailed archive> ... sh archive HISTORY
The shar command appears in 4.4BSD. SECURITY CONSIDERATIONS
It is easy to insert trojan horses into shar files. It is strongly recommended that all shell archive files be examined before running them through sh(1). Archives produced using this implementation of shar may be easily examined with the command: egrep -v '^[X#]' shar.file 4.4BSD June 6, 1993 4.4BSD
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy