answersLogoWhite

0


Best Answer

WHAT I NEED DONE in .bash_profile define a function go_show, that will

  • Go to a specific directory
  • Print your current location
  • Print the contents of your current directory

The directory this function takes you to will be specified as an argument to the function on the command line. You will need to use a positional parameter to do this
User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a Linux function that will go to any directory then ls and pwd on it?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write the program in Linux to find the reverse of any string?

i am sam


What is the root folder or root directory?

The Root folder and Root directory is the Main location for the Linux system. Only users with super user privileges can access the directory. ANY changes made successfully in the root directory will be system wide. its the quickest way to destroy the operating system!


Write down the names of any five operation system?

Unix linux genix android dos


How the directory structure of Linux works?

Primarily, it works to organize files ina way that the user or the programs can predict with accuracy where any given file may be.


Can you write any c prigramme in c language witthout any function?

No. At minimum, you need to provide a main() function.


How do you write rule for a function?

You can write them any way you like, as long as the basic definition of "function" is maintained. Basically, this means that the function must be defined uniquely defined for every input.


What is the difference between a boot and a root partition?

/boot is where the Linux kernel images, as well as parts of the bootloader are stored. The "root" is simply the uppermost directory in a Unix/Linux file system. Any directory that is not given it's own partition will be placed as a subdirectory in the file system on the "root" partition. Assuming you gave a partition to /etc, /bin, /boot, /usr, and so on, you wouldn't need a "root" partition at all.


Why is Linux more protected from viruses?

Most people who write virus's target the windows OS they just don't bother with Linux. Usually anyone who can use Linux wont find any difficulty in removing virus's, so theres no point in sending them a virus.


Where can you download Linux?

From any of the websites for the many Linux distros out there.


What is the Linux utility used to save small directory structures with small data files onto a single backup volume?

The tar utility (acronym for Tape ARchive). The size of the directory structure and the file sizes are immaterial, they only affect the overall size of the archive volume. The tar utility uses gzip to compress the files. You can also use the Linux zip utility to achieve the same thing or indeed any compression program.


Does the root directory in Linux have any sub-directories you can not search as an ordinary user?

That would be /root, which is the home directory of the root user. Keep in mind, according to the Filesystem Hierarchy Standard, /root is actually optional, but I've never seen a Linux distribution that didn't have it anyway.


How do you become a Linux developer?

There's no specific training or certification necessary to write programs for Linux. Anyone who knows C, for instance, can write programs and compile them, just as they would on any other platform. If you meant a Linux kernel developer, there's no formal qualifications. Just submit any patches to a current developer. If you continue to submit good code and start your own git tree, more people will likely pull from you.