DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-01-29 10:29:05

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

how to remove a directory via telnet

hi guys,

i tried rmdir -r /mnt/HD_a2/Data/Archive/<date here>

but the syntax is not working

can someone tell me what the syntax is as i need to delete a folder or two including all its contents in one fail swoop

cheers

Offline

 

#2 2008-01-29 11:06:58

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: how to remove a directory via telnet

hi guys,

figured it out, it was not rmdir .. it was actually

/ # rm -R /mnt/HD_a2/Data/ARCHIVE/2007-07-31

============

now a separate issue, is there a way i can chmod 777 from the root of the HD_a2 and apply that permission to ALL files and folders underneath it?

it seems that some files are being locked and doing this on individual files will take FOREVER as there is over 60k of files

cheers

Offline

 

#3 2008-01-29 11:08:16

jayas
Member
Registered: 2008-01-24
Posts: 151

Re: how to remove a directory via telnet

fickle wrote:

i tried rmdir -r /mnt/HD_a2/Data/Archive/<date here>

Try "rm -r ..." which removes files and directories recursively.

Jaya


H/W=B1 F/W=1.04; RAID1: SAMSUNG HD501LJ T166 (500GB, SATA 3.0Gb/s 16MB)

Offline

 

#4 2008-01-29 11:10:00

toni
Member
Registered: 2007-08-26
Posts: 41

Re: how to remove a directory via telnet

Hi, the command I use is rm -r /mnt/Hd_a2/xxx/ , but this is only working, if you have premission to do so. Being root does not mean, you have the right to remove a users directory, but it means, that you can guarant these rights, so check the rights with ls -l in the root directory of the dir you want to remove, and if needed give yourself full access (chmod a+rwx or make it yours, chown root.root) and afterwards rm -r should work...

Tóni

Offline

 

#5 2008-01-29 11:31:07

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: how to remove a directory via telnet

love these forums, cheers guys

Offline

 

#6 2008-01-29 14:37:29

HaydnH
Member
Registered: 2007-09-28
Posts: 187

Re: how to remove a directory via telnet

"now a separate issue, is there a way i can chmod 777 from the root of the HD_a2 and apply that permission to ALL files and folders underneath it?"

You could easily... but you shouldn't!!! This would be a security risk. If you really want to do this there is a -R flag for chmod, i.e: chmod -R 777 *

Haydn.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB