Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Print all the directory with no directory name mydir Post 302769616 by lxdorney on Tuesday 12th of February 2013 11:02:28 PM
Old 02-13-2013
thank for the response and yes that what exactly I want, but executing the script I got error message:

and here is my process:
Code:
pwd
/root

Code:
ls server
ab_1234510_40  ab_1234511_1  ab_1234567_1  ab_1234567_2  ab_1234567_3  ab_1234569_1  ab_1234569_4  ab_1731458_9

Code:
nano test3.sh
then copy and paste your script

Code:
./test3.sh
du: cannot access `server/ab__*': No such file or directory
0k
du: cannot access `server/ab__*/mydir': No such file or directory
du: cannot access `server/ab_file.txt_*': No such file or directory
0k file.txt
du: cannot access `server/ab_file.txt_*/mydir': No such file or directory
du: cannot access `server/ab_mydir_*': No such file or directory
0k mydir
du: cannot access `server/ab_mydir_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234510_40/:_*': No such file or directory
0k server/ab_1234510_40/:
du: cannot access `server/ab_server/ab_1234510_40/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234511_1/:_*': No such file or directory
0k server/ab_1234511_1/:
du: cannot access `server/ab_server/ab_1234511_1/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234567_1/:_*': No such file or directory
0k server/ab_1234567_1/:
du: cannot access `server/ab_server/ab_1234567_1/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234567_2/:_*': No such file or directory
0k server/ab_1234567_2/:
du: cannot access `server/ab_server/ab_1234567_2/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234567_3/:_*': No such file or directory
0k server/ab_1234567_3/:
du: cannot access `server/ab_server/ab_1234567_3/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234569_1/:_*': No such file or directory
0k server/ab_1234569_1/:
du: cannot access `server/ab_server/ab_1234569_1/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1234569_4/:_*': No such file or directory
0k server/ab_1234569_4/:
du: cannot access `server/ab_server/ab_1234569_4/:_*/mydir': No such file or directory
du: cannot access `server/ab_server/ab_1731458_9/:_*': No such file or directory
0k server/ab_1731458_9/:
du: cannot access `server/ab_server/ab_1731458_9/:_*/mydir': No such file or directory


Last edited by lxdorney; 02-13-2013 at 12:12 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

print all files of a directory

At the moment I do not know anything UNIX script :rolleyes: but i need to make script that prints the content of the archives (of text) that are deposited in a directory and Later erases these archives, leaving the directory emptiness It would be like repository for print please... (9 Replies)
Discussion started by: monica
9 Replies

2. Shell Programming and Scripting

How to print a directory list to a file?

I have directory of files listed with stats. I need to print only files with the same stats to a file. I tried this, and it printed a blank document. *1556 > tmp/list it did not work any suggestions? (3 Replies)
Discussion started by: rocinante
3 Replies

3. Solaris

delete buffer from print directory

Hi all, Operting system : Solaris 9 Oracle application: 11.5.10 i would like to ask query related to buffer area of pinter on solaris server. we are trying to print cheques using oracle application on network printer. some times it is printing the cheques with out any problem but... (1 Reply)
Discussion started by: maooah
1 Replies

4. Shell Programming and Scripting

Print directory name along with their path

Can any one tell me that how can i print all directory with their path in a given parent directory. i.e. parent directory /home/usr/ Now this shoe directory may contain sevral directory /home/usr dir1/ dir1.1/ dir1.2/ dir2 dir2.1/ dir2.2/ ... (5 Replies)
Discussion started by: jadoo_c2
5 Replies

5. Shell Programming and Scripting

[awk] print all filenames in directory

Hello, I was given a (I suppose) a simple task which I don't know how to do. Before coming here I have read a dozen of awk tutorials (full read, not just line-skipping) but I still don't know how to do this. Task: Write an script file 'check.awk' with a parameter current directory that... (5 Replies)
Discussion started by: c0dehunter
5 Replies

6. Shell Programming and Scripting

Print the current directory using perl

Hi I have this code to print the current directory using Perl use Cwd qw(abs_path); my $path = abs_path($0); print "$path\n"; But it is displaying my perl source code file along with the directory. like this C:\Perl\duration.pl But I want it only to display this... (1 Reply)
Discussion started by: srijith
1 Replies

7. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies

8. UNIX for Advanced & Expert Users

A way to print only part of directory path

Hi, So I struggled to find a solution to the following problem: I want to make sed print only part of multiple different paths. So lets say we have /path/path1/path2/logs/bla/blabla /path/path1/path2/path3/logs/yadda/yadda/yadda Can someone suggest a way to make sed or other... (5 Replies)
Discussion started by: dampio
5 Replies

9. UNIX for Beginners Questions & Answers

Loop through directory and print on line

In the bash below I am trying to loop through all the R1.gz in a directory (always 1), store them in ARRAY, and cut them before the second _. That is being done but I can't seem to print then one a single line seperated by a space. Is the below the best way or is there a better solution? Thank you... (3 Replies)
Discussion started by: cmccabe
3 Replies
MOUNT_FTP(8)						    BSD System Manager's Manual 					      MOUNT_FTP(8)

NAME
mount_ftp -- mount a FTP filesystem SYNOPSIS
mount_ftp [-i] [-o options] ftp://host[:port][/path] node DESCRIPTION
The mount_ftp command mounts a FTP-enabled server directory at ftp://host[:port][/path] at the mount point indicated by node. If the -i option is not used, all the required information to establish a login to the remote server must be available in the ftp URL, including username & password if needed. The user ID for all files and folders is set to the user's real user ID. The group ID for all files and directories is set to unknown, and the permissions default to read and execute for user, group and other. The options are: -i Interactive mode, you are prompted for the username and password if you did not supply one in the url. -o Options passed to mount(2) are specified with the -o option followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. The rdonly option will be set even if it was not specified because mount_ftp does not allow files to be opened with write access on servers. ftp://host[:port][/path] The FTP-enabled server directory to mount as a volume. If port is not specified, then port 21 is used. If path is not specified, then the path "/" is used. node Path to mount point. EXAMPLES
The following example illustrates how to mount the FTP-enabled server directory ftp.apple.com/ at the mount point /Volumes/mntpnt/ mount_ftp ftp://ftp.apple.com/ /Volumes/mntpnt/ SEE ALSO
mount(2), unmount(2), mount(8) HISTORY
The mount_ftp command first appeared Mac OS X Version 10.2. RETURN VALUES
0 mount_ftp successfully mounted the server directory. [ENOENT] The server directory could not be mounted by mount_ftp because the node path is invalid. [ENODEV] The server directory could not be mounted by mount_ftp because it is not FTP-enabled or because it does not exist, or because node does not have proper access. [ECANCELED] The server directory could not be mounted by mount_ftp because the user did not provide proper authentication credentials. BUGS
mount_ftp only supports mounting read-only. Mac OS X June 6, 2003 Mac OS X
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy