computer






 

Question by  lawilliams90 (22)

In Unix, how do I remove a file from a folder?

 
+6

Answer by  angille (55)

In all variations of Unix (FreeBSD, Linux, MacOSX) using the 'rm' command (without quotes) followed by the filename will do the trick. If the file is protected, you may have to 'sudo rm' and supply the root password to remove the file. To completely delete the file, use 'shred' instead. Read 'man rm' for more information.

 
+5

Answer by  PowerIsMe (844)

From command line, go into the folder using "cd " and then type "rm ". rm is for remove. If you have a graphical-interface just click and delete.

 
+4

Answer by  gordon (304)

In order to remove a file from a folder in Unix you must follow the instructions posted here. Move into the folder in which the file you wish to delete resides by typing "cd ". Then type "rm ". If the system asks for confirmation,type "y". Please note that in Unix folders are called directories.

 
+2

Answer by  dirkGently (18)

There are a couple straighforward ways to do this in the CLI (Command Line Interface): First $ cd $ rm (alternatly, simply do the absolute path to the filename: e. g. $ rm /) Second $ sudo mv / /dev/null First method is easiest.

 
You have 50 words left!