Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Get the name of the file excluding the extension Post 302204935 by Yogesh Sawant on Friday 13th of June 2008 12:54:27 AM
Old 06-13-2008
check if this is what you want:
Code:
ls -1 test.txt | cut -d '.' -f1

This User Gave Thanks to Yogesh Sawant For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Excluding a file type from an archive

:confused: I'm trying to archive a site excluding all PDF files in order to keep the size down. I have manged to do this in the past using the exclude argument in the tar command and something along the lines of *.pdf. Unfortunately, I failed at the time to note the syntax that I used and have... (1 Reply)
Discussion started by: Stuart
1 Replies

2. UNIX for Advanced & Expert Users

find excluding a directory and a file

Hi I have some 5 folders and two files in the current directory. I want to delete all, expect one folder(files in the folder too should not be deleted) and a file in the current directory. Lets say the folder and file that should not be deleted as 'a'(folder name) and 'b'(file name). Can you... (1 Reply)
Discussion started by: ammu
1 Replies

3. Shell Programming and Scripting

Excluding certain paras from a file

Hi, I have a log file which might have certain paragraphs. Switch not possible Error code 1234 Process number 678 Log not available Error code 567 Process number 874 ..... ...... ...... Now I create an exception file like this. cat text.exp Error code 1234 Process number 874 (3 Replies)
Discussion started by: kaushys
3 Replies

4. Solaris

how to find out the file's name excluding string?

Hello, Under one directory, I can use below command to find out the file names with string "Export terminated successfully without warnings" grep -i -l "Export terminated successfully without warnings" *.* My question is : how I find out the file names without including string "Export... (5 Replies)
Discussion started by: GreatJerry
5 Replies

5. UNIX for Advanced & Expert Users

Excluding a file from tar...

The title is not as easy as it sounds.... I am trying to exclude and file while ssh and untaring the file on the fly. The command I am using is... The command typically works but recently I've add the X option along with the exclude file. Essentially, the exclude file is being ignored when run... (2 Replies)
Discussion started by: lwif
2 Replies

6. Shell Programming and Scripting

Excluding file from tar

Hello i am using HP-UX rapdb2 B.11.23 U ia64 1068321383 unlimited-user license. I am tryiyng to exclude for tar all files that start with TOT* but i doues not work I am using: tar -cvf /ODS/prepaid/CDR_FLOW/WORK/backup.tar --exclude='TOT*' and i get the error: tar: cannot stat... (3 Replies)
Discussion started by: chriss_58
3 Replies

7. Shell Programming and Scripting

Read file excluding XML in it

Hi , I have a file like below.I want all the content in a single line excluding the XML.How can i proceed? t=21 y=23 rg=xyz ..... <xmlstarts> . . <xmlends> lk=99 lo=09 (3 Replies)
Discussion started by: chetan.c
3 Replies

8. UNIX for Dummies Questions & Answers

Finding new file, but excluding directory..

hi, I need to find files that have been created less than 3 days ago. However, I need to only search specific directories. I've searched about the net and found some useful commands such as : find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3 however I cannot get it... (2 Replies)
Discussion started by: horhif
2 Replies

9. UNIX for Beginners Questions & Answers

Rm * excluding one file

Hi All, I am trying to remove below file except the last one. With wild char It is removing all. Is there a way to exclude only one file and remove files: MM_6000_001 MM_6000_002 MM_6000_003 MM_6000_004 if I do rm * it is removing all. I want the exclude and remove others. any... (14 Replies)
Discussion started by: arunkumar_mca
14 Replies

10. UNIX for Beginners Questions & Answers

Find file with extension and excluding directory

Hi, I have an inquiry on how do I use the find command in Solaris Unix to find some file ends with extension : txt, err in the root directory with modified date of 30days and this find command will also need to exclude b directory and its subdirectory. All the files from the above find criteria... (5 Replies)
Discussion started by: snowfrost88
5 Replies
MISSIDENTIFY(1) 						  Jesse Kornblum						   MISSIDENTIFY(1)

NAME
missidentify - Find executable files without an executable extension SYNOPSIS
missidentify [-rqablv] [-s|-S len] [-Vh] [FILES] DESCRIPTION
Miss Identify looks at the header of every file it processes and determines if it is a PE executable (Windows executable). Such files can include programs, device drivers, and DLLs. By default the program displays the filename if the extension of the file does not match one of the known executable extensions (.exe, .com, .sys, or .dll). Other options can make the program display the filename of all executable files. -r Enables recursive mode. All subdirectories are traversed. Please note that recursive mode cannot be used to examine all files of a given file extension. For example, calling missidentify -r *.txt will examine all files in directories that end in .txt. -q Silent mode. All error messages except fatal errors are surpressed. -a Display filenames of all executables -b Enables bare mode. Strips any leading directory information from displayed filenames. This flag may not be used in conjunction with the -l flag. -l Enables relative file paths. Instead of printing the absolute path for each file, displays the relative file path as indicated on the command line. This flag may not be used in conjunction with the -b flag. -v Verbose mode. Displays the name of every 10th file as a progress indicator. -s-S len Prints strings of length len with each filename. With lowercase letter, puts filename before string. With uppercase letter, puts strings before filename. -h Show a help screen and exit. -V Show the version number and exit. BUGS
The program can be fooled by any file with more than 1024 bytes between the MZ header and the PE header. AUTHOR
Miss Identify was written by Jesse Kornblum http://missidentify.sf.net/ COPYRIGHT
Copyright (C) 2008 Jesse Kornblum. This is free software. You may redistribute copies of it under the terms of the GNU General Public License version 2. There is NO WARRANTY. See the file COPYING for more details. SEE ALSO
file(1) Jesse Kornblum v1.0 - 20 Feb 2008 MISSIDENTIFY(1)
All times are GMT -4. The time now is 01:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy