Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Special meaning characters in dir names Post 302173590 by JWilliams on Friday 7th of March 2008 06:07:44 AM
Old 03-07-2008
Special meaning characters in dir names

Hello,

I've had a daemon go a little bit mental and create directories using somments from a config file. The end result is I've ended up with directories with names such as #, 5625), (5725 etc etc etc...

However, when I try and delete them I get syntax errors, ( not expected,

rmdir #
Usage: rmdir [-p] DirectoryName...

etc...

Can I quote these to tell the shell to take them literally, as opposed to reading their special meanings? If not, any other suggestions on how to get rid of them?

Thanks,

John.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Recursively check the file/dir names

Hi, ' recgrep find . | xargs grep ' is used to scan the contents recursively. I have a different requirement. I need to scan just the names and check for a pattern and display with fullpath. Is that already available? Closest that I am trying is 'ls -R | grep pattern' Here I would get multiple... (1 Reply)
Discussion started by: eagercyber
1 Replies

2. Shell Programming and Scripting

substrings from all files incl subdirs into csv with dir names

Greetings! I have multiple files, one per subdirectory, all with the same file name. All subdirectories are one level deep from the main directory. The data in the files is tab delimited between fields and record delimited with a newline. The subdirectory names have the date in the... (5 Replies)
Discussion started by: vtischuk@yahoo.
5 Replies

3. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

4. Shell Programming and Scripting

Get dir names.

Hi, i have a directory and sub directory`s inside. i want to take all the files name and add them into array. for example : $ ls Debug script.c src typescript $ Array = Debug Array= scripts.c Array = src Array = typescript. Thanks for the help. Or. (2 Replies)
Discussion started by: orushw
2 Replies

5. Shell Programming and Scripting

Remove special character ($) from file names

Hello I've searched here and on the 'net for examples of a script or command line function that will remove the $ character from all file names only that can be done within the directory that contains the file names - which are all html files. ie, I have a directory that contains html files... (6 Replies)
Discussion started by: competitions
6 Replies

6. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

7. Tips and Tutorials

How to manage file names with special characters

One of the common questions asked are: how do i remove/move/rename files with special (non-printable) characters in their name? "Special" doesn't always mean the same. As there are more and less special characters, some solutions are presented, ranging from simple to very complicated. Usually a... (0 Replies)
Discussion started by: bakunin
0 Replies

8. Shell Programming and Scripting

Renaming File Names in a folder/Dir

Hi Team, I'm new to Unix shell scripting . I've the following requirement A folder contains the list of files with the following format ab.name.11.first ab.name.12.second ab.name.13.third ---------- I have to rename the above file to like below ... (6 Replies)
Discussion started by: smile689
6 Replies

9. UNIX for Dummies Questions & Answers

Retrieving names of files in a dir without overlapping

Hi, I have been trying to retrieve the names of files present in a directory one by one but the names of files are getting overlapped on one another. I tried the below command. ls -1 > filename please help me in getting the file names line by line without overlapping. I am using korn... (6 Replies)
Discussion started by: Pradhikshan
6 Replies

10. UNIX for Beginners Questions & Answers

What is the meaning the $ special character?

Hello... and thank you in advanced for any help anyone can offer me I'm hoping someone can explain what the leading $ is/means (i.e. $PS1, $HOME, etc).... I was having a discussion with someone and was trying to explain it... Which I felt like I came up kind of short with how well I did it. ... (12 Replies)
Discussion started by: bodisha
12 Replies
explain_rmdir_or_die(3) 				     Library Functions Manual					   explain_rmdir_or_die(3)

NAME
explain_rmdir_or_die - delete a directory and report errors SYNOPSIS
#include <libexplain/rmdir.h> void explain_rmdir_or_die(const char *pathname); DESCRIPTION
The explain_rmdir_or_die function is used to call the rmdir(2) system call. On failure an explanation will be printed to stderr, obtained from explain_rmdir(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_rmdir_or_die(pathname); pathname The pathname, exactly as to be passed to the rmdir(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
rmdir(2) delete a directory explain_rmdir(3) explain rmdir(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_rmdir_or_die(3)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy