Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to copy/move to a file with a special character as the 1st char in the filename? Post 302266463 by methyl on Wednesday 10th of December 2008 08:58:16 AM
Old 12-10-2008
Assuming this is on a non-operational system.

cp -p foo.bar ./-rubbish

To remove file.
rm -i ./-rubbish

You would be advised to not leave files like this on a live server. They upset basic unix commands and backup software.
 

10 More Discussions You Might Find Interesting

1. HP-UX

special character on Filename.. help!!!urgent

I'm trying to rename a file name but the original file has a special character caused by typo. I've tried numerous combination of characters but the file name (original) is still not being recognized which in turn, would not allow me to rename the file. Can someone help? The filename is a... (1 Reply)
Discussion started by: genzbeat
1 Replies

2. Shell Programming and Scripting

move filenames with to another filename without the last character ~

Hi, I need to move filenames with the following format below into filenames without the ~ like sample below. I hope you can help me create a simple unix script that will do this. Thanks in advance! move filename from: AIRS20081225-235641.BSP~ AIRS20081225-235648.BSP~ AIRS20081225-235640.BSP~... (3 Replies)
Discussion started by: ayhanne
3 Replies

3. Shell Programming and Scripting

File Move Based on 1st Character of File Name

I need some help with a unix script to mv image files to subdirectories based on the 1st character of the filename. See example below... /images/main 1191.jpg 9999.jpg A101.jpg A102.jpg B201.jpg c333.jpg ... Z999.jpg I would like to move to the following: ... (11 Replies)
Discussion started by: srdconsulting
11 Replies

4. Shell Programming and Scripting

Special Char in Data file

Hi All, I have a data file in UNIX which i am trying to load into Oracle table using Oracle SQL Loader. The problem is, one of the filed contains special character (ex: Square). And due to this reason, my script fails. Could you please let me know, how to identify which character is... (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

5. Shell Programming and Scripting

Remove special char from end of the file

Hi I am working on a bash script and would know how to use cut or sed to remove (F/.M/d h) from a text file. Before 1 text to save (F/.M/d h) after 1 text to save Thanks in advance (5 Replies)
Discussion started by: pelle
5 Replies

6. Shell Programming and Scripting

Move file based on filename

Hi All I need a script to manipulate files based on a filename: example filename: 66600_042706.pdf the script will create a directory 66000 only if this directory is not existing. If that directory is existing it will just move the file to 66000/666000_042706.pdf in addition, i want to... (4 Replies)
Discussion started by: aemestech
4 Replies

7. Shell Programming and Scripting

remove the special characters and move the file into another server

(5 Replies)
Discussion started by: number10
5 Replies

8. UNIX for Advanced & Expert Users

Stty and copy special character

Hello, I do have a little issue here and Google doesn't give me any solution @this moment. In HP UX Vi editor: I want to place this character: ® I copied it from internet or for example Word Special Symbols. But how do I paste it in Vi? Many thanks in advance :) Sincerely, Arjan (7 Replies)
Discussion started by: velde_van_der_a
7 Replies

9. Shell Programming and Scripting

To search distinct special char in file

hi, i need to search distinct special character from a file which is a pipe delimited from a specific column for eg: input file.txt aa|bb|cc|$abc aa|bb|ccc|#abol bb|xss|ddd|$xyz nn|yyy|qqq|=qqqq abe|qqq|yyy|=aaa aaa|yyy|zzzz|#aaaa . . . my desired output $ (10 Replies)
Discussion started by: rohit_shinez
10 Replies

10. Shell Programming and Scripting

^M special character in Filename

Hi All, Special character ? is added in between filename. Am not able to figure our why this is happening. In my Development environment special characters are not present. This issue is happening in the higher environment. It would be helpful if somebody can tell what are the possible... (3 Replies)
Discussion started by: weknowd
3 Replies
nisrmdir(1)							   User Commands						       nisrmdir(1)

NAME
nisrmdir - remove NIS+ directories SYNOPSIS
nisrmdir [-if] [-s hostname] dirname DESCRIPTION
nisrmdir deletes existing NIS+ subdirectories. It can remove a directory outright, or simply remove replicas from serving a directory. This command modifies the object that describes the directory dirname, and then notifies each replica to remove the directory named dirname. If the notification of any of the affected replicas fails, the directory object is returned to its original state unless the -f option is present. This command will fail if the NIS+ master server is not running. OPTIONS
The following options are supported: -i Interactive mode. Like the system rm(1) command the nisrmdir command will ask for confirmation prior to removing a direc- tory. If the name specified by dirname is a non-fully qualified name this option is forced on. This prevents the removal of unexpected directories. -f Force the command to succeed even though it may not be able to contact the affected replicas. This option should be used when a replica is known to be down and will not be able to respond to the removal notification. When the replica is finally rebooted it will read the updated directory object, note that it is no longer a replica for that directory, and stop responding to lookups on that directory. Cleanup of the files that held the now removed directory can be accomplished manu- ally by removing the appropriate files in the /var/nis directory. See nisfiles(4) for more information. -s hostname Specify that the host hostname should be removed as a replica for the directory named dirname. If this option is not present all replicas and the master server for a directory are removed and the directory is removed from the namespace. Special per-server and per-directory access restrictions may apply when this command updates the serving lists of the affected NIS+ servers. For more information, see nisopaccess(1). OPERANDS
The following operand is supported: dirname An existing NIS+ directory. EXAMPLES
Example 1 Using the nisrmdir Command To remove a directory bar under the foo.com. domain, one would use the command: example% nisrmdir bar.foo.com. To remove a replica that is serving directory bar.foo.com. one would use the command: example% nisrmdir -s replica.foo.com. bar.foo.com. To force the removal of directory bar.foo.com. from the namespace, one would use the command: example% nisrmdir -f bar.foo.com. ENVIRONMENT VARIABLES
NIS_PATH If this variable is set, and the NIS+ directory name is not fully qualified, each directory specified will be searched until the directory is found. See nisdefaults(1). EXIT STATUS
The following exit values are returned: 0 Successful operation. 1 Operation failed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
NIS+(1), nisdefaults(1), nisopaccess(1),nisrm(1), nisfiles(4), attributes(5) NOTES
NIS+ might not be supported in future releases of the Solaris operating system. Tools to aid the migration from NIS+ to LDAP are available in the current Solaris release. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.11 2 Dec 2005 nisrmdir(1)
All times are GMT -4. The time now is 03:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy