How to unmount a folder and do check disk only in that path


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to unmount a folder and do check disk only in that path
# 1  
Old 10-26-2011
How to unmount a folder and do check disk only in that path

I need to check if a folder has some kind of logic disk problems.

I have a FreeBSD machine where the (root)\tmp\TEST folder has some file created by a script that i cannot delete.

If i rename the tmp\TEST folder then i can delete them (apparently) but if i recreate a folder in tmp directory with the same name 'TEST' the files 'magically' reappears.

So i need to unmount the folder and do a checkdisk but only in this folder (as the machine is actually hosting a firewall system and i want to be sure to not compromise the other files in the system).

As i'm really at first step in linux/freebsd command learning:

how can i unmount the folder tmp and how can i do a checkdisk only in tmp folder?
# 2  
Old 10-26-2011
Why are you having problems deleting them? Oddly structured names?
If the files reappear then a currently running process creates them. They probably are there for a reason. Please show the output of
Code:
find /tmp -exec ls -l {} \;

# 3  
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question