Monday 22 June 2015

Some commands in Ubuntu

ls -i filename gives the inode number of the file

ln a1 a2
this will give a2 the inode no. of a1 // the linking process

ls>file
The contents or list of files of a folder will go into the specified file

ls a* means give the list of all the files starting with 'a'

ls a? means give all list of all the files starting with 'a' but with just one character after that.

ln -s a1 a2
this will make a2 the shortcut for a1
a2 will have a different inode number i.e. different disk space carrying only the address of the disk location of a1.

tail filename // display last portion of the file

head filename // display starting portion of the file

rmdir // delete the folder if it is empty

rm -r // stands for remove recursively

mv //changes the names of the file or their locations

cal // displays the calender

sort // sorts the list of files or contents of a file.

$chmod 777 filename or $chmod u+x filename
follow this by
./filename
this file will now be executed.

Following any command with the symbol '&' eg ./filename& will run the command in the background. Whenever the CPU is idle, this command will run.

jobs: shows all the background processes which are currently running.

No comments:

Post a Comment