- pwd- Output the current directory that you are in
- ls - list the content of the current directory
- ls -a - list all the content, including hidden files
- ls -l - list the content and its information
- cd someFolder – change directory to someFolder
- cd .. - Go up a directory
- cd - - Return to the previous directory
- cp source destination – Copy sourceto destination
- cp -r source destination – Copy a folder recursively from source to destination
- mv source destination - Move (or rename) a file from source to destination
- rm someFile- Remove someFile
- rm -f someFile - Remove someFile without prompt
- rm -r folder - Remove a folder and its content recursively
- mkdir foldername – Create a new folder foldername
- rmdir foldername – Remove an empty folder
- file someFile – Show the file type of someFile
- cat file1 file2 – Concatenate file1to file 2
- cat > someFile – Concatenate standard input to someFile
- less someFile - View and paginate someFile
- head someFile - Show first 10 lines of someFile
- tail someFile - Show last 10 lines of someFile
- chmod unknown file - Change file permission of file to unknown
- chown user:group file - Change ownership of fileto userand group group
- ln -s source destination – Create a link from source to destination
Showing posts with label file. Show all posts
Showing posts with label file. Show all posts
Sunday, 7 September 2014
Linux File Commands
Tuesday, 21 January 2014
Github - Add files
For file safety and good place for sharing, GitHub is the place your project files should be. Either private or public. Project files are located on your computer and you want to add them to github, how to do it : - register, login to the github site - on the site, use the Create Repository button and create one for your project - after repository was created you need to copy somewhere the www address of your repository. Something like https://github.com/User_Name/Repository_Name.git Windows: - download windows application from : GitHub for Windows - add and commit the files using the downloaded application Linux: - using terminal : - go to the project's directory cd the_project - git init to start git - add all the files to local list git add * - commit the files git commit -m "commit" - tell to your computer where to add the files git remote add origin https://github.com/User/RepName.git - add files to github git push origin master
Subscribe to:
Posts (Atom)