answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What function is used to copy the names of the files in a directory to an array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How insert data into array in php?

There's several ways: 1) You can put square brackets on the end of a variable to create an array key inside that variable: $names['first'] = "john" $names['last'] = "smith" 2) You can use the array function: $names = array('first' => "john", 'last => "smith"); a lot of people set this function out like this: $names = array( 'first' => "john", 'last' => "smith" ); it makes it easier to read hope this helps


How is an array name interpretedwhen it is passed to a function?

An array is still an array, regardless of how you pass it into functions. It is still an array-type variable at the beginning of a function. However, the function itself may manipulate the array by "imploding" it into a string with a delimiter, using array values with only specific keys, and such.


What is a multi-level directory system?

A directory is a logical grouping of files. By maintaining several directories the file manager can permit the same file name to be used in separate directories to refer to independent copies of the same file or completely different files. The contents of a directory - a list of file names and their associated information - are stored in a special file called a directory file which is assigned a file name which distinguishes it from non-directory files. By allowing directory file names to appear alongside non-directory file names in a directory, the file manager is able to link separate directories hierarchically as shown in figure 1. The directory at the top of the structure is given the special name, ROOT because the hierarchical structure resembles an upside-down tree. The directories below the root directory are known as subdirectories. by earnie


Can you give more than one main function in the program?

In any source-files, the function names must be unique. In any program (which might be created from multiple source-files), the public function names must be unique.


What is the difference between .file and ..file in Unix?

Neither are actually files. They are references to directories, the current one and the parent directory, respectively. They can be used in file copy and move operations in place of explicitly printing the directory names. For instance:mv ./* ..would move all files from the child directory into it's parent.


What command instructs grep to look through all files in the current directory for lines containing the string Pat Lloyd and output just the names of the files that contain a match?

Use the command:grep -l 'Pat Lloyd' *


Display the size and names of six largest files in the currenty directory listed in descending order in unix?

ls -1Ss | tail -n +2 | head -6


Are files and directory names in Linux limited to 52 characters?

No ext2, ext3, ext4, zfs file systems has 255 bytes filename limit and has no pathname limits


Show sorted list of files in your home directory those contain the word 'computer 'inside them?

In UNIX, type `grep -l computer *`. This should list the names of all files that contain the word 'computer' in alphabetical order.


In ms dos which command can sort files in a directory list?

dir Lists all files and directories in the directory that you are currently in. dir /ad List only the directories in the current directory. If you need to move into one of the directories listed use the CD command. dir /s Lists the files in the directory that you are in and all sub directories after that directory, if you are at root "C:\>" and type this command this will list to you every file and directory on the C: drive of the computer. dir /p If the directory has a lot of files and you cannot read all the files as they scroll by, you can use this command and it will display all files one page at a time. dir /w If you don't need the info on the date / time and other information on the files, you can use this command to list just the files and directories going horizontally, taking as little as space needed. dir /s /w /p This would list all the files and directories in the current directory and the sub directories after that, in wide format and one page at a time. dir /on List the files in alphabetical order by the names of the files. dir /o-n List the files in reverse alphabetical order by the names of the files. dir \ /s |find "i" |more A nice command to list all directories on the hard drive, one screen page at a time, and see the number of files in each directory and the amount of space each occupies. dir > myfile.txt Takes the output of dir and re-routes it to the file myfile.txt instead of outputting it to the screen.


Why are hidden files on a DOS disk?

Hidden files are files stored on the disk, but which do not show up when you list a directory of the disk.In DOS, you normally type the command DIR to view the files on a disk. If you would like to see hidden file names, use the command DIR /AH (A=Attribute; H=Hidden).


What is ls -latr?

ls list directory content-l long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and file name-a lists all files in the given directory, which names begins with .-r Reverse the order of the sort.-t sort the list of files by modification time.This lists the most recently modified files at the end of the listing. ls -latr is a convenient way to see what has changed recently in a directory.