Wednesday 7 January 2015

Backtrack Commands - Tut 2



rm

remove: delete. Clears the file or folder that you indicate. As before you can enter the full path and file name. This from now we will ignore, I think it has become clear with the two previous commands.

To delete a file: # rm filename

To delete an empty folder: # rm foldername

To delete a folder containing files and / or other folders:

# Rm-r foldername

Other options: "-f" does not ask for confirmation to delete or "-v" shows what clears.

-------------------------------------------------- ---------------
cp

copy: copy. Copy the file indicated where you say. Here we can also play with routes for both the source file, as in the destination. You can also put the name you want to give the copy. For example, if we were in / etc/X11 and would like to make a backup of xorg.conf in our personal folder:

# Cp xorg.conf / home / tu_carpeta / xorg.conf.backup
-------------------------------------------------- ---------------
mv

move: move. Same as above, only instead of making a copy, directly drives the file as you indicate, can be other than the original:

# Mv / etc / pepino.html / home / tu_carpeta / ese_pepino.html

Another very practical use that can be given is to rename a file. Simply indicate the new name in the second argument with the same path first. In this example we assume that we are in the folder that contains:

# Mv pepino.html ese_pepino.html
-------------------------------------------------- ---------------
find

find: find. Find the file or folder that you specify:

# Find /-name cucumber

The above command would look everywhere folders and files called cucumber. If we were confident that is located at / var eg it indicarĂ­amos:

# Find / var-name cucumber

If we're not sure of the name can indicate it with wildcards. Suppose we seek name contains "Pepi" in the same folder as before:

# Find / var-name * pepi *

You have other options. For example we can tell you find the files / folders over 1500 KB:

# Find /-size +1500

Or the files / folders containing the name "Pepi" and have less than 1000 KB:

# Find /-name *-size pepi * -1000
-------------------------------------------------- ---------------
clear

clear: clear. Clears the screen / console.

# Clear
-------------------------------------------------- ---------------
ps

Process Status: status of processes. It shows us what we want to know about the processes running on your system. Each process is identified by a number called PID. If we place ...

# Ps-A

... Will show a listing of all processes, their PID to the left and to the right name. If you want more information:

# Ps aux

0 comments:

Post a Comment