You would love to read:
How to work with alias command in unix?
Finding a file with its name in unix/linux?
In order to make a alias shortcut permanent you need to make that entry into the .profile file of your home directory.
to find out the file go to your home directory and type
$ ls -latr
This command will show all hidden files (.profile is also a hidden file)
Then edit the file using vi editor i.e.
$ vi .profile
Make the desired entries and save the file , same can be seen in below screenshots.
Then just restart your system , to let the .profile execute and make your shortcuts permanent 🙂 🙂
It can be quite interesting to work in linux through alias command , you can create some crazy names for big commands or just shorten some big paths to some memorable words.
Just use the alias command to do that:
SYNTAX: $ alias myfolder=”cd /home/deepak/abcd/dd/erfd”
and now when you gonna type myfolder you will reach to the cd /home/deepak/abcd/dd/erfd path.
CONS: It reamins active till that session and so are temporary.
PROS: can be made permamnent for a unix /linux machine if the same whole command is added to the .profile file of a user and then a restart to execute that file and make our alias works forever 🙂
HOW TO MAKE AN ENTRY IN .PROFILE FILE ? WATCH OUT OUR NEXT POST !!
Looking for a way to find out a file in a unix/linux box , you just need the exact file name with proper case and that’s it .
Use below command and enoy!!
Find . -name “name_of_file.doc”
here . represents the loaction from where it will search , if not at all sure you can use from / too i.e.
Find / -name “name_of_file.doc”