Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quick-refs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Alan Marsh
quick-refs
Commits
1f95081c
Commit
1f95081c
authored
6 years ago
by
Michael Marsh
Browse files
Options
Downloads
Patches
Plain Diff
added cp, mv, and dd to the filesystem quick-ref
parent
bf025c93
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
filesystem.pdf
+0
-0
0 additions, 0 deletions
filesystem.pdf
filesystem.txt
+33
-0
33 additions, 0 deletions
filesystem.txt
with
33 additions
and
0 deletions
filesystem.pdf
+
0
−
0
View file @
1f95081c
No preview for this file type
This diff is collapsed.
Click to expand it.
filesystem.txt
+
33
−
0
View file @
1f95081c
...
@@ -38,6 +38,39 @@ Moving Around
...
@@ -38,6 +38,39 @@ Moving Around
| popd | Pop the top of the directory stack, cd'ing to the new top |
| popd | Pop the top of the directory stack, cd'ing to the new top |
Moving, Copying, and Extracting Pieces of Files
-----------------------------------------------
| *Command* | *Result* |
| --------- | -------- |
| cp *a* *b* | Create a copy of file *a* named *b* |
| mv *a* *b* | Rename file *a* so that it is now *b* |
| dd if=*a* of=*b* | Dump the contents of input file *a* to output file *b* |
For all of these the files may be in any directory, so to move a
file `foo` up a directory, you could run
mv foo ../foo
or just
mv foo ../
`dd` is an extremely powerful tool, and `if` and `of` are only the
beginning of its options. Either can be omitted, and use STDIN or
STDOUT as the default. Here's another simple example:
dd if=/dev/zero of=foo bs=1024 count=5
This will create a file `foo` with the first 5kB of `/dev/zero`,
which will provide you with as many NULL bytes as you request. Give
this a try, and then run
xxd foo
See the manpage for `dd` for all options. It's well worth you time
to learn more about this command!
File Permissions
File Permissions
----------------
----------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment