Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to unmount a folder and do check disk only in that path Post 302568303 by mirrorx on Thursday 27th of October 2011 06:39:54 AM
Old 10-27-2011
This is the output:
Code:
[root@NSMeXpressII /]# cd tmp
[root@NSMeXpressII tmp]# find /tmp -exec ls -l {} \;
total 16
drwx------  2 root root 16384 Sep  2  2010 lost+found
total 4
srwxrwxrwx  1 xfs xfs 0 Aug 24 14:57 fs7100
srwxrwxrwx  1 xfs xfs 0 Aug 24 14:57 /tmp/.font-unix/fs7100
total 8
-rw-r--r--  1 root root 152 Oct 27 08:31 cpu.call
-rw-r--r--  1 root root 152 Oct 27 08:31 /tmp/.nsmxwui/cpu.call
-rw-------  1 nsm nsm 39 Oct 27 08:01 /tmp/.s.PGSQL.5432.lock
total 0
total 0
srwxrwxrwx  1 nsm nsm 0 Oct 27 08:01 /tmp/.s.PGSQL.5432
total 4
srwxrwxrwx  1 nsm nsm 0 Sep 15 10:54 X991
srwxrwxrwx  1 nsm nsm 0 Sep 15 10:54 /tmp/.X11-unix/X991
[root@NSMeXpressII tmp]#


What this command do?

---------- Post updated at 10:24 AM ---------- Previous update was at 09:42 AM ----------

After done the previous output i've reproduced the error:

i've run the script again (i've generated the new files) i've tryed to delete them and verified they are undeletable.

Then i've run again your command: (find test/ -exec ls -l {} \Smilie

And this is the new output:

Code:
[root@NSMeXpressII tmp]# find test/ -exec ls -l {} \;
total 168
-rw-r--r--  1 nsm nsm 162689 Oct 27 09:11 FW-Log.txt
-rw-r--r--  1 nsm nsm 162689 Oct 27 09:11 test/FW-Log.txt
[root@NSMeXpressII tmp]#

why this file is undeletable?



Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.


---------- Post updated at 12:39 PM ---------- Previous update was at 10:24 AM ----------

(For mod) Ok thnkU Smilie

Last edited by Franklin52; 10-27-2011 at 05:47 AM.. Reason: Please use code tags, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to check the actual path instead of link path

Hi I have a path link /test/df/link1/actual/file1 here link1 is actually a softlink link1= a/b i need to print the ACTUAL FULL path instead of a linked path is there any direct command to print the actual path of any linked path eg showPhyscialPath /test/df/link1/actual/file1 and it... (4 Replies)
Discussion started by: reldb
4 Replies

2. HP-UX

Unmount and remove all Logical vol.Volume group and physical disk

Hi, Someone please help me with how i can unmount and remove all the files systems from a cluster. This is being shared by two servers that are active_standby. (3 Replies)
Discussion started by: joeli
3 Replies

3. Windows & DOS: Issues & Discussions

How can I upload a zip folder on a unix path from my windows folder?

Hello, I am an amature at UNIX commands and functionality. Please could you all assist me by replying to my below mentioned querry : How can I upload a zip folder on a unix path from my windows folder? Thanks guys Cheers (2 Replies)
Discussion started by: ajit.yadav83
2 Replies

4. UNIX for Dummies Questions & Answers

ls + folder path

I am using ls -l -R to view all the files in the parent directory and sub -directories. Is it possible to view the path of the files in another column. (1 Reply)
Discussion started by: soumodeep123
1 Replies

5. HP-UX

/usr out of disk space need to unmount/ expand volume /mount

Greetings, I am running HP-UX 10.2 and /usr is out of disk space already. I installed IE 5.0 for UNIX on my machine under /usr and browsed the Internet for a while and presto no more disk space. I have plenty of hard disk space on my computer so would like to expand the size of the volume. The... (5 Replies)
Discussion started by: Dirk_
5 Replies

6. OS X (Apple)

Can't Mount Disk / Image after bad unmount

I have had a little issue with one of my disks, the usb cacble was pulled out and one of the external drives on it would no longer mount. I used First Aid and it verified and repaired both OK / nothing to do). After lots of messing around and not being able to mount I used Drive Genius 2 and that... (1 Reply)
Discussion started by: Cranie
1 Replies

7. OS X (Apple)

When a disk won't 'Unmount"

hdiutil detach -Force disk&number (ex:hdiutil detach -Force disk1) (3 Replies)
Discussion started by: unimachead
3 Replies

8. Shell Programming and Scripting

Unmount USB disk

Hi, How can I unmount an usb disk using the command umount? (3 Replies)
Discussion started by: Guccio
3 Replies

9. Shell Programming and Scripting

if (disk is mounted) unmount if (disk is unmounted) mount

Hey there, sorry if this is a bit too much of a noob question, trying to get to grips with a simple bash script - but i have done ZERO bash scripting. basically having worked out how to mount and unmount disks using: disktool -m *device* & disktool -e *device* - and looking at the result of... (2 Replies)
Discussion started by: hollister
2 Replies

10. Shell Programming and Scripting

Given a path get the last folder in the path

Hi, I have a path such as: PATH= "/home/user/Desktop/folder1/folder2"and I want to output the last folder in the path i.e. "folder 2" Any idea how I should do this? grep? Thanks! (1 Reply)
Discussion started by: bashnewbee
1 Replies
chroot(1M)						  System Administration Commands						chroot(1M)

NAME
chroot - change root directory for a command SYNOPSIS
/usr/sbin/chroot newroot command DESCRIPTION
The chroot utility causes command to be executed relative to newroot. The meaning of any initial slashes (/) in the path names is changed to newroot for command and any of its child processes. Upon execution, the initial working directory is newroot. Notice that redirecting the output of command to a file, chroot newroot command >x will create the file x relative to the original root of command, not the new one. The new root path name is always relative to the current root. Even if a chroot is currently in effect, the newroot argument is relative to the current root of the running process. This command can be run only by the super-user. RETURN VALUES
The exit status of chroot is the return value of command. EXAMPLES
Example 1 Using the chroot Utility The chroot utility provides an easy way to extract tar files (see tar(1)) written with absolute filenames to a different location. It is necessary to copy the shared libraries used by tar (see ldd(1)) to the newroot filesystem. example# mkdir /tmp/lib; cd /lib example# cp ld.so.1 libc.so.1 libcmd.so.1 libdl.so.1 libsec.so.1 /tmp/lib example# cp /usr/bin/tar /tmp example# dd if=/dev/rmt/0 | chroot /tmp tar xvf - ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
cd(1), tar(1), chroot(2), ttyname(3C), attributes(5) NOTES
Exercise extreme caution when referencing device files in the new root file system. References by routines such as ttyname(3C) to stdin, stdout, and stderr will find that the device associated with the file descriptor is unknown after chroot is run. SunOS 5.11 15 Dec 2003 chroot(1M)
All times are GMT -4. The time now is 12:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy