Wiki User
∙ 10y agoThe command in a terminal is: ls (short for List). This will list the files in the current directory.
Whilst in the Home directory, to list the files in a different directory, for instance Videos, use: ls Videos.
Wiki User
∙ 10y agoWiki User
∙ 12y agols
DIR
rm -rv /path/to/directory
Recursively removes all files from the directory and all under it.
The easiest way is to use the 'cp' command. Put the name of all the files in the 'cp' command line and use another directory as the target; all the files will be copied to the new directory. Note: you may need to use the -r (recursive) copy option if you have subdirectories in the source directory.
find -size 0
You can get a list of all the files in the current directory with the "ls -a" command.
If you want everything, start at the root directory and issue the command: ls -R
RMDIR /S rmdir /? Removes (deletes) a directory. RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q Quiet mode, do not ask if ok to remove a directory tree with /S
The command for deleting a file in DOS is DEL. If the file you are trying to delete is in the current directory, type DEL followed by the full filename. E.g. del file001.txt If there are multiple files, the wildcard * can be used. del file*.txt will delete all the text files that start with 'file' del file*.* will delete all the files that start with file. del *.txt will delete all the text files. del *.* will delete all the files in the current directory. It is possible to delete files in another directory by typing the full path and filename del c:\folder01\*.* will delete all the files in the directory c:\folder01\ DEL will not affect hidden files, but careless use of this command could damage your operating system so use with care.
ls | sort -r Use ls command to list all files, in the present directory. Then pipe '|' the output of the ls command to sort -r. The -r option will reverse the sort.
bash# ls -la Above command will list all files in current directory in long listing format. To know more read the manual page of ls command. bash# man ls
In order to zip a subdirectory in Linux you would use the zip command with the recursive flag to specify that it should add all files under that directory into the zip file. The command would then be zip -r .zip .