03-07-2006
if the directory is in it's own filesystem --- unmount, newfs, and remount the filesystem ...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi, i am on aix. i used smitty to remove a user..
but then found that its directory still exists....
so i have to remove the directory manually...
am i doing it the right way? (2 Replies)
Discussion started by: yls177
2 Replies
2. Shell Programming and Scripting
I have searched the FAQ - by using sort, duplicates, etc.... but I didn't get any articles or results on it.
Currently, I am using:
sort -u file1 > file2 to remove duplicates. For a file size of 1giga byte approx. time taken to remove duplicates is 1hr 21 mins.
Is there any other faster way... (15 Replies)
Discussion started by: radhika
15 Replies
3. Shell Programming and Scripting
Friends,
I have .txt file with following format.
START
ABC|Prashant1|Patel1
ABC|Prashant2|Patel2
ABC|Prashant1|Patel1
ABC|Prashant2|Patel2
END
I would like to do:
1) Delete line with START
2) Delete line with END
3) Remove ABC|
4) Delete duplicate records
The following command... (7 Replies)
Discussion started by: ppat7046
7 Replies
4. Shell Programming and Scripting
What's the best way to delete everything in a directory, but not the directory itself, without using shell wildcards? (9 Replies)
Discussion started by: pdc
9 Replies
5. Shell Programming and Scripting
I have a 5 GB text file(log/debug)
I want to delete all lines containing 'TRACE'
Command used
sed -i '/TRACE/d' mylog.txt
Is there any other fastest way to do this? (1 Reply)
Discussion started by: johnbach
1 Replies
6. AIX
Hi, what happened is we want to count all the files in a directory and inside this directory got many folders and so take long time to count it. Already run for about few minutes but still not done. The command we use to count is find . -type f | wc -l
Just wondering if there is any other... (9 Replies)
Discussion started by: ngaisteve1
9 Replies
7. Shell Programming and Scripting
OK
I have two filelists......
The first is formatted like this....
/path/to/the/actual/file/location/filename.jpg
and has up to a million records
The second list shows filename.jpg where there is more then on instance.
and has maybe up to 65,000 records
I want to copy files... (4 Replies)
Discussion started by: Bashingaway
4 Replies
8. Shell Programming and Scripting
My Input.....file1
ABCDE4435 Connected to 107.71.136.122 (SubNetwork=ONRM_RootMo_R SubNetwork=XYVLTN29CRBR99 MeContext=ABCDE4435 ManagedElement=1)
ABCDE4478 Connected to 166.208.30.57 (SubNetwork=ONRM_RootMo_R SubNetwork=KLFMTN29CR0R04 MeContext=ABCDE4478 ManagedElement=1)
ABCDE4478... (5 Replies)
Discussion started by: pareshkp
5 Replies
9. Shell Programming and Scripting
Hi expert,
Is there any fastest way to calculate recursive directory, and I have total 600 directories have 100000 files and 10 directory approximately 9000000 - 10000000 each files per directory. currently using this command "du -k --max-depth=0" to get the size but very slow it take 24 hours... (9 Replies)
Discussion started by: rufino
9 Replies
10. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
LEARN ABOUT REDHAT
umount
UMOUNT(8) Linux Programmer's Manual UMOUNT(8)
NAME
umount - unmount file systems
SYNOPSIS
umount [-hV]
umount -a [-dflnrv] [-t vfstype] [-O options]
umount [-dflnrv] dir | device [...]
DESCRIPTION
The umount command detaches the file system(s) mentioned from the file hierarchy. A file system is specified by giving the directory where
it has been mounted. Giving the special device on which the file system lives may also work, but is obsolete, mainly because it will fail
in case this device was mounted on more than one directory.
Note that a file system cannot be unmounted when it is `busy' - for example, when there are open files on it, or when some process has its
working directory there, or when a swap file on it is in use. The offending process could even be umount itself - it opens libc, and libc
in its turn may open for example locale files. A lazy unmount avoids this problem.
Options for the umount command:
-V Print version and exit.
-h Print help message and exit.
-v Verbose mode.
-n Unmount without writing in /etc/mtab.
-r In case unmounting fails, try to remount read-only.
-d In case the unmounted device was a loop device, also free this loop device.
-a All of the file systems described in /etc/mtab are unmounted. (With umount version 2.7 and later: the proc filesystem is not
unmounted.)
-t vfstype
Indicate that the actions should only be taken on file systems of the specified type. More than one type may be specified in a
comma separated list. The list of file system types can be prefixed with no to specify the file system types on which no action
should be taken.
-O options
Indicate that the actions should only be taken on file systems with the specified options in /etc/fstab. More than one option type
may be specified in a comma separated list. Each option can be prefixed with no to specify options for which no action should be
taken.
-f Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
-l Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is
not busy anymore. (Requires kernel 2.4.11 or later.)
THE LOOP DEVICE
The umount command will free the loop device (if any) associated with the mount, in case it finds the option `loop=...' in /etc/mtab, or
when the -d option was given. Any pending loop devices can be freed using `losetup -d', see losetup(8).
FILES
/etc/mtab table of mounted file systems
SEE ALSO
umount(2), mount(8), losetup(8).
HISTORY
A umount command appeared in Version 6 AT&T UNIX.
Linux 2.0 26 July 1997 UMOUNT(8)